Do I have to manually destroy every object on end of layout?

Discussion and feedback on Construct 2

Post » Sat May 02, 2015 4:43 pm

This is more of a memory management issue because I am confused by the object's ability [which is awesome] to retain its state [position/whatever] when the game switch back to the layout it once visited.

Does that mean the objects are always in memory ?
Should I manually call upon the destruction of all object instances upon end of layout ?
B
12
S
3
Posts: 288
Reputation: 1,694

Post » Sat May 02, 2015 5:06 pm

Typically they are destroyed automatically with two exceptions.
1. The object is global. It won't be destroyed when changing layouts and will go to the new layout with you.
2. It has the persist behavior. Actually it probably is destroyed but it's state is retained so if you ever go back to that layout it will still be in the same spot you left it.
B
92
S
32
G
109
Posts: 5,290
Reputation: 70,991

Post » Sat May 02, 2015 5:53 pm

Thanks !
The persist behavior is Magic !
B
12
S
3
Posts: 288
Reputation: 1,694


Return to Construct 2 General

Who is online

Users browsing this forum: Apollo14, JesusJ, Refeuh, zenox98 and 16 guests