Note that there are some explanatory texts on larger screens.

plurals
  1. POAdobe Air 3 iOS app memory leak issue maybe related to getDefinitionByName class
    primarykey
    data
    text
    <p>I'm developing an application with adobe air 3 for ios and having low memory errors frequently. After ios 5 update os started to kill my app after some low memory warnings.</p> <p>But the thing is profiler says app uses 4 to 9 megs of memory. There are a lot of bitmap copy operations around and sometimes instantiates new bitmaps from embedded bitmaps. I highly optimized everything and look for leaks etc.</p> <p>I watch profiler for memory status and seems like GC clears everything. everything looks perfect but app continues to get low memory errors and gets killed by os.</p> <p>Is there anything wrong with this code below. Because my assumption is this ClassReference never gets off from memory even the profiles says memory is cleared. I used clone method to pass value instead of pass by ref. so I guess GC can collect that local variable. I tried with and without clone nothing changes.</p> <p>If the code below runs 10-15 times with different tile Id's app crashes but with same ID's it continues working.</p> <p>Is there anyone who is familiar with this kind of thing?</p> <p>tmp is bitmapData</p> <pre><code>if (isMoving) { tmp=getProxyImage(x,y); //low resolution tile image } else { strTmp="main_TILE"+getTileID(x,y); var ClassReference:Class = getDefinitionByName(strTmp) as Class; //full resolution tile image //something wrong here tmp=new ClassReference().bitmapData.clone(); //something wrong here ClassReference=null; } return tmp.clone(); </code></pre> <p>Thanks for reading. I hope some one has a solution for this.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload