User Tag List

Results 1 to 4 of 4

Thread: Number of objects in memory keeps increasing

  1. #1
    Clicker Multimedia Fusion 2

    Join Date
    Feb 2007
    Location
    UK
    Posts
    243
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Number of objects in memory keeps increasing

    During test running of my frame the number of active objects in memory keeps increasing - this is despite making sure that any launched objects are destroyed and there are no "always create" type of events.

    The total number of objects roughly starts at 1870, this then keeps going up slowly, jumping a few digits every now and then and I don't know why.

  2. #2
    Clicker Fusion 2.5Android Export Module

    Join Date
    Sep 2010
    Posts
    564
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    i think that it keeps adding if you have animations playing. I noticed when I had debugger turned on that as soon as I started walking with the character it increased the numbers, until that particular direction was fully played, then it stopped adding. So I guess every animation frame is treated like it's an object. If I misunderstand your question then just forget about what I just said

  3. #3
    Clicker Multimedia Fusion 2

    Join Date
    Feb 2007
    Location
    UK
    Posts
    243
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, It think you're probably right - though it seems odd that animated actives add to the number of objects.

    So what is the workaround? I've currently got max number of objects at 5,000. That should be enough to finish making my game but when the game is finally played and played for a while this might go over - what happens then?

  4. #4
    Clicker Multimedia Fusion 2

    Join Date
    Feb 2007
    Location
    UK
    Posts
    243
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I can confirm that animations DO NOT add to the number of objects in memory.

    I had a situation yesterday while performing the first phase of play-testing my almost finished game. From the start I made the maximum number of objects allowed in the frame to 5,000 as I figured that would be enough (indeed, the total number of active objects at the start of my frame is currently 3,367). However after about an hour of play objects that should appear were not doing so; then I checked the object count and it was 5,000 so I'd hit the maximum.

    I then changed the maximum allowed to 20,000 and play-tested for a good few hours, By the end the object count had reached over 17,000! If playing for any considerable length of time this would have reached 20,000 easily and the game would've broke again.

    In an effort to curtail this "memory leak" I moved all object launch and object creation events into groups of events and set to disabled at the start. Now when I run the frame the number of objects stays static at 3,367 and is no longer increasing. So animated objects do not increase object count, it seems only events that launch objects or create objects do.

    In order to have those much needed launching objects, such as projectiles from lasers etc, I'll need to set events to the room transition actives to turn those groups on and off so when the player enters a room the group activates and projectiles appear and when they leave they stop. I don't yet know if turning them off once they're on will stop the memory leak or not - I sure hope so otherwise this while venture will have been a complete waste of time.

Similar Threads

  1. Does creating objects at runtime use a lot of memory?
    By Simflare in forum Android Export Module 2.5
    Replies: 3
    Last Post: 6th March 2014, 02:38 AM
  2. 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
  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
  •