How do I destroy an object completely ?

0 favourites
  • 4 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

  • Can somebody share experience please ?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)