performance - Loading images takes my direct memory up | AS3 -
i'm loading bitmaps, without adding them stage, each image takes direct memory up. large images take more memory, i'm wondering how keep direct memory low after loading bitmaps, or maybe i'm doing here wrong or missing something?
var mybitmapholder:bitmap; var bitmaploader:loader = new loader(); bitmaploader.addeventlistener(event.complete, bitmaploaded); bitmaploader.load(new urlrequest("mybitmap.png"); private function bitmaploaded(e:event):void { mybitmapholder = e.currenttarget.content; }
after loading bitmap, i'm storing using mybitmapholder access upon request. i'm using more 30 bitmaps, works same example above each image separately.
so ... there no free resource - have load in memory, or have load unload each or few bitmaps. 'eat' other resource cpu , network traffic etc.
first have remove 'bitmaploader' event.complete listener in 'bitmaploaded' function: bitmaploader.removeeventlistener(event.complete, bitmaploaded); }
have sure load bitmap/s once.
@ this: as3 - memory management , what memory management techniques in flash/as3.
can @ : imagedecodingpolicy also.
Comments
Post a Comment