Jump to content


  • Posts

  • Joined

  • Last visited

Shakespeare87's Achievements



  1. Guys, I used Memory Tracker for AS3 : http://divillysausages.com/blog/tracking_memory_leaks_in_as3 And I confirmed that the target that I sent in for tween wasn't been null (as going through TweenLite codes and also ThrowProps codes) causing memory reference to the target itself retained. As when I commented the .to method and the reference for that target is no longer there (comment off the tweening). Please do get back to me ASAP on this, the leak is blocking our project forwarding. Thanks and Regards, Wilson
  2. Thanks for your effort, I made my work around though. Is a good will to inform about this. I did the above codes as a test, I'm optimizing BitmapData memory reference, from class (library) and url. Your team made below claim : [new in version 1.89:] When you load() an ImageLoader, it will automatically check to see if another ImageLoader exists with a matching url that has already finished loading. If it finds one, it will copy that BitmapData to use in its own Bitmap in order to maximize performance and minimize memory usage. After all, why load the file again if you've already loaded it? (The exception, of course, is when the ImageLoader's noCache is set to true.) onComplete will be called twice because loader1 and 2 loaded the same url. Since it is the same url, as from above description on version 1.89, it should return the same BitmapData object memory reference. but as from above test that I've done. I've proven that the memory reference is different. The first test shows the reference is the same when load() called at different time, but when different loaders called at the same time. No offence but greensock framework doesn't check if any other loader is calling the same url. Hence BitmapData object memory reference is different. I know this is very deep level, hardly ppl will go to this extend. I made my work around though, but as a responsible programmer and out of good will, I'll still like to inform you and the development team.
  3. var imgLoader:ImageLoader = new ImageLoader("data/img/global_ui/blue/ButtonStd1.jpg", {onComplete : onComplete}); var imgLoader2:ImageLoader = new ImageLoader("data/img/global_ui/blue/ButtonStd1.jpg", {onComplete : onComplete}); imgLoader2.load(); imgLoader.load(); var tempBD:BitmapData = null; function onComplete(evt:LoaderEvent):void{ if(tempBD == null) tempBD = evt.target.rawContent.bitmapData; else trace(tempBD == evt.target.rawContent.bitmapData); } How about this, suppose the same url should return the same bitmapData but it doesn't. I'm creating a central bitmapData reference for memory efficiency. disposing when unused There is a work around to check. Can it be checked before dispatchEvent?
  4. var imgLoader:ImageLoader = new ImageLoader("data/img/global_ui/blue/ButtonStd1.jpg", {onComplete : onComplete}); var imgLoader2:ImageLoader = null; imgLoader.load(); var tempBD:BitmapData = null; function onComplete(evt:LoaderEvent):void{ tempBD = imgLoader.rawContent.bitmapData; tempBD.dispose(); // imgLoader.dispose(true); imgLoader2 = new ImageLoader("data/img/global_ui/blue/ButtonStd1.jpg", {onComplete : onComplete2}); imgLoader2.load(); } function onComplete2(evt:LoaderEvent):void{ trace(imgLoader2.rawContent.bitmapData.height); } If I comment dispose(true), onComplete2 will give and error. GreenSock ImageLoader does not check if the bitmapData is being disposed or not before sending.