User Tag List

Results 1 to 4 of 4

Thread: BUG [256-34] Active Picture not releasing memory when destroyed

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleMac Export ModuleUnicode Add-on
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    AyreGuitar's Avatar
    Join Date
    Jan 2011
    Location
    Wales, UK
    Posts
    1,113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    BUG [256-34] Active Picture not releasing memory when destroyed

    Francois, Andos, Yves - I've noticed that when using large images with Active Picture and destroying them repeatedly in the same frame, it can run out of memory very quickly and crash. This is because the memory is not being released properly.
    I had emailed this to Francois in May 2012, but I guess it slipped through the net.

    To solve the problem (if you don't mind changing stuff in XCode):
    In Classes>Extensions>CRunkcpica.m you need to add just 1 line to the destroyRunObject routine:

    Code:
    -(void)destroyRunObject:(BOOL)bFast
    {
    	[szImageName release];
    	if(uConnection != nil)
    	{
    		[uConnection cancel];
    	}
            if(aImage != nil)    [aImage release];   //Add this line to release image data, otherwise can run out of memory quickly and crash your app
    }

  2. #2
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    Thanks, nice find

  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Ha! Sorry for that.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,367
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    I can confirm that adding that line definately works. My game used to crash the second time the player entered the mainframe, but now it seems to work great! Thanks alot AyreGuitar!

Similar Threads

  1. Take picture and make from it Active Object / Active picture
    By qenio in forum Android Export Module Version 2.0
    Replies: 3
    Last Post: 3rd February 2014, 07:34 AM
  2. BUG: Active Picture > New Picture from Selector doesn't wait for image - Beta9
    By AyreGuitar in forum iOS Export Module Version 2.0
    Replies: 5
    Last Post: 27th January 2013, 03:09 PM
  3. Last Active has been destroyed
    By K1kk0z90 in forum XNA Export Module Version 2.0
    Replies: 2
    Last Post: 13th June 2011, 04:29 PM
  4. Picture Object and Memory
    By nivram in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 13th March 2008, 05:36 PM
  5. Advice about Active Object vs Active Picture
    By Pablo in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 11th October 2007, 02:40 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
  •