How can i detect memory-leak?

I make a lots of components(inherit CCNode).

so that I confuse with object delete and release.

Specifically, memory part is more problematic.

i want to know where are happened memory-leak.

How can i detect it?

and if i don’t use autorelease(), can I also use CC_SAFE_DELETE(component)?

If the class is inherit from engine, you’d better use release, not use delete.
Because other class may retain this object.
You can run the function on Xcode, it can detect memory-leak.

If the class is inherit from engine, you’d better use release, not use delete.
Because other class may retain this object.
You can run the program on Xcode, it can detect memory-leak.

Oh, I see.

thank you.

If you do coding on win32 platform, you can use ‘Visual Leak Detector’ which is very easy to use, and it supports vs2008 and vs2010.