destroy in Composer and module like Match-Three-Space-RPG-master

Sorry again the disorder.

I was watching the “Match-Three-Space-RPG-master” project and is very useful. However there something I do not understand, in any module is done in the method finalizesomething like group.displayObject = nil.

From what I understand if I enter the elements in the composer schena they will have a “display.remove(myObject)” in the destroy phase.

But for inquiries concerning “myObject = nil”?

I would like to understand why the “Match-Three-Space-RPG-master” project has virtually no memory leaks despite there are no variable = nil.

Thank you all

In two words “Correct Scoping”.

“Match-Three-Space-RPG-master” properly scopes references to objects such that they fall out of scope when no longer in use and Violla!, the references are cleared and garbage collecting can commence.

Very well

So if I used the same system I would not need to put any “variables = nil” over transitions and timer.

Also as regards 200k of leaks is normal?

Hi.  Are you a sure you’ve got a leak?

Memory usage going up and staying up isn’t always a leak.  It could just be the memory manager adjusting to you passing a usage threshold.

It’s a leak when it goes up and stays up, the does it again, and again, …

I know that probably doesn’t help a lot, but measuring/checking for leaks is very tricky because there are many factors that affect usage and they vary by application.

You’re right I made a big mistake.

The leak is about 2k for each Game Over. While The Texture is perfect.

I would say that it is acceptable. Right?

Looks acceptable, but no telling if your game is development complete.(all of your new assets & mods added) You can always do the math to figure out how much will be gained on each game played. If it was in the realm of adding gigs then I would find it unacceptable. Either way, it is pretty good practice you are doing to keep an eye on that though.

In two words “Correct Scoping”.

“Match-Three-Space-RPG-master” properly scopes references to objects such that they fall out of scope when no longer in use and Violla!, the references are cleared and garbage collecting can commence.

Very well

So if I used the same system I would not need to put any “variables = nil” over transitions and timer.

Also as regards 200k of leaks is normal?

Hi.  Are you a sure you’ve got a leak?

Memory usage going up and staying up isn’t always a leak.  It could just be the memory manager adjusting to you passing a usage threshold.

It’s a leak when it goes up and stays up, the does it again, and again, …

I know that probably doesn’t help a lot, but measuring/checking for leaks is very tricky because there are many factors that affect usage and they vary by application.

You’re right I made a big mistake.

The leak is about 2k for each Game Over. While The Texture is perfect.

I would say that it is acceptable. Right?

Looks acceptable, but no telling if your game is development complete.(all of your new assets & mods added) You can always do the math to figure out how much will be gained on each game played. If it was in the realm of adding gigs then I would find it unacceptable. Either way, it is pretty good practice you are doing to keep an eye on that though.