How do I destroy an object completely ?

Get help using Construct 2

Post » Wed Feb 04, 2015 6:36 pm

Hi. I tried to manage memory of my game. I have a layout with 8.8 mb images usage which is showed in Debug board , and a button to destroy a few of objects ( cost 2 mb images ) .
After clicking the destroy button, those objects are destroyed, Debug board counted "Zero" of them . But the images usage still showed 8.8mb . I wonder if those images are destroyed or not ? Any suggests please ?
If the objects cant destroy completely, my game will use ton of memory usage from Creating objects which will make the game crash on mobile devices. Thanks.
B
13
S
1
Posts: 96
Reputation: 881

Post » Wed Feb 04, 2015 6:58 pm

Destroying all instances of an object won't unload the associated images. If it did, creating an instance of that object again would require reloading the image, which takes time.

In any case, you shouldn't have to worry unless you have an obscene number of unique images. If you have a sprite with 1MB of associated images and you create 100 instances of that sprite, you'll only need 1MB of memory for that sprite.
Moderator
B
109
S
41
G
20
Posts: 1,586
Reputation: 18,996

Post » Wed Feb 04, 2015 9:39 pm

If a device runs my game, it might load all 100mb of unique images in my game. That will cause a mobile device crash. But in fact, It only uses 12 mb / 100mb of unique images run at a time. I wonder when it load all 100mb of images , does it make game slower or crash ??? Thanks.
B
13
S
1
Posts: 96
Reputation: 881

Post » Fri Feb 06, 2015 10:20 pm

Can somebody share experience please ?
B
13
S
1
Posts: 96
Reputation: 881


Return to How do I....?

Who is online

Users browsing this forum: Kenthria, oddreal and 7 guests