User Tag List

Results 1 to 5 of 5

Thread: Removing objects from MMF2's memory

  1. #1
    No Products Registered

    Join Date
    Jul 2008
    Posts
    131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Removing objects from MMF2's memory

    I've noticed that once an object is loaded into the frame during runtime, it stays in the memory of MMF2 even after it has been destroyed -- for all frames. This means that if I had 1,000 unique objects that were all called during runtime from Frame 1, they would all still be loaded in the memory for frame 2 and so on as well(IF, the same object is used in other frames). This isn't so much a problem for me, but I have fear it'll cause problems for others. The MB consumption during runtime goes from 58 MB to a staggering 200MB by the time I'm at frame 2.(Please note I'm also using HWA, and most objects are global objects)

    I'm wondering if it's somehow possible to unload all the objects from the memory after each frame, so that the MB consumption stays around 60~80 MB per frame. (Unless I'm totally going about this the wrong way, then please list some other suggestions, thanks)

    So for example:
    [Run Application]
    FRAME 1
    Debugger says : 20 MB
    Objects = 0
    --I load an object in this frame that uses 50 MB.
    --Debugger says : 70 MB
    --Objects = 1


    I go to frame 2

    FRAME 2
    Debugger says : 70 MB
    Objects = 0
    - the same object is in this frame, HOWEVER, I did NOT call it. The debugger shows that it's loaded into the memory because I have 50 MB added on, even though there are 0 objects.
    (The object is not created at start, and "Force load on call for all objects" is not checked.)

    I'm suggesting that there be an option to "unload" the objects from the previous frame, so that it always start off at default memory allocation. (Unless loading/unloading from memory causes lag spikes)

  2. #2
    No Products Registered

    Join Date
    Jul 2008
    Posts
    131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Removing objects from MMF2's memory

    Wow, Actually I solved my own problem. Here's the solution:

    If you go directly to the next frame that has the SAME objects in it as the previous, it's going to still have those objects in the memory. HOWEVER

    If you go to a frame that DOESN'T have the same objects in the previous, it unloads those objects.

    So basically this is what happened:
    [Run Application]
    FRAME 1
    Debugger says : 20 MB
    Objects = 0
    -Load object in frame that uses 50 MB.
    -Debugger says: 70 MB
    -Objects = 1

    [Jump to a frame that is blank frame]
    FRAME 3
    Debugger says : 20 MB
    Objects= 0

    *Note: Frame 1 & 2 have the same objects, which is why I went from Frame 1 to 3. Frame 3 is the empty frame, so it unloaded the objects automatically from the memory. Now, going from Frame 3 to 2 would result in the default memory.*

    Sorry this probably didn't make much sense.

  3. #3
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Removing objects from MMF2's memory

    Interesting way of doing it...

    stephen1980
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


  4. #4
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Removing objects from MMF2's memory

    Thanks for providing your solution, nonetheless!

  5. #5
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Removing objects from MMF2's memory

    Glad to hear there was a simple workaround. All you would need is a blank frame a a global value to store te frame to go to and then you mvoe to the frame you need upon loading the blank frame.

Similar Threads

  1. Saving on Memory - Cutting Up Objects
    By Corlen in forum Android Export Module Version 2.0
    Replies: 4
    Last Post: 24th April 2013, 05:55 PM
  2. Removing objects
    By Skyhunter in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 28th February 2013, 12:13 PM
  3. Little question about objects loaded in memory
    By paobrasil in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 23rd May 2012, 04:21 PM
  4. Global Objects and memory useage
    By DaveC in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 29th April 2012, 09:48 AM
  5. Memory usage: objects needs how much?
    By Leander in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 26th July 2008, 10:44 PM

Posting Permissions

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