dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Static and Dynamic Heap??

  1. #1
    Junior Member
    Join Date
    Apr 2009
    Posts
    3

    Static and Dynamic Heap??

    ello..

    Okay, i did this restaurant menu on n73.. I've shrinked the image files to it's minimum, and the memory panel in device central shows a graph that is nearly full.. whenever i exceed it, it will turn my graphics into red boxes.. how can i clear those things in the memory? and i still dont know how does this memory actually works..

    So whenever i put new graphics into the artboard, it will use up more and more memory and i will never be able to finish this assignments if its like this.. Can anyone help me??

  2. #2
    Moderator
    Join Date
    Apr 2001
    Location
    Akron OH, USA
    Posts
    4,841
    Flash has its own cyclical memory management. If you remove an image by removing the corresponding movieclip object then it may take some time before the memory management actually releases the memory that was used by the image.

    So, unfortunately, there is no way to force Flash lite to free memory instantaneously. Instead you delete ActioniScript objects (using delete keyword), and remove movie clips (using removeMovieClip) which marks these assets for removal from memory.

    JPEG images are a particular problem because they decompress into memory and take up more memory than the original file size. It is hard to know how much memory JPEGs will require.

    You might experiment with png instead. Even though the png is larger file size it will have a more accurate sense for the memory it will use.

    If you are having a problem with memory management then you may need to rely more upon ActionScript to dynamically build screens by attaching and removing movie clip objects from the library. This way the memory usage increases and decreases as you need, instead of having many assets on the stage that you show and hide which always reside in memory even when not visible.
    aviarts.com - web development and flash development

  3. #3
    Senior Member
    Join Date
    Aug 2006
    Posts
    322
    It is a good practice to manage many images into an application is to keep the images outside the movie and call them as needed.

    LoadMovie();
    LoadMovieNum();

    marlopax

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center