WHAT IS THE BEST MEMORY LEAK SOLUTION .?

HELLO EVERYONE

CAN I ASK?

THERE’S A CODE FOR RESTARTING OF MEMORY?

OR ERASE THE OLD ADDRESS ?

Please stop using all capital letters (aka shouting) in your posts.

It is against forum rules and results in people being less likely to help you.

Thanks

ok sorry i dont know.

No problem :slight_smile:

To answer your question:

The best way to prevent memory leaks is to ensure you are cleaning up after yourself properly.

Which means to remove any display objects you are no longer using (via display.remove( object ) or object:removeSelf() ), nil out objects after removing them: object = nil

etc.

I believe this guide will help you: http://docs.coronalabs.com/guide/basics/optimization/index.html

aw… tnx ser…  hehe :slight_smile:

i dont know what important of nil .

im not using object = nil after removing my object…

i think dats why ders memory leaks hehe… ty

Basically, if you don’t “nil” your objects after removing them the garbage collector can’t remove them as it presumes they are still in use. 

Please stop using all capital letters (aka shouting) in your posts.

It is against forum rules and results in people being less likely to help you.

Thanks

ok sorry i dont know.

No problem :slight_smile:

To answer your question:

The best way to prevent memory leaks is to ensure you are cleaning up after yourself properly.

Which means to remove any display objects you are no longer using (via display.remove( object ) or object:removeSelf() ), nil out objects after removing them: object = nil

etc.

I believe this guide will help you: http://docs.coronalabs.com/guide/basics/optimization/index.html

aw… tnx ser…  hehe :slight_smile:

i dont know what important of nil .

im not using object = nil after removing my object…

i think dats why ders memory leaks hehe… ty

Basically, if you don’t “nil” your objects after removing them the garbage collector can’t remove them as it presumes they are still in use.