Thanks @evWin i hadn’t seen the wiki.
It provides some info.
also @stevetranby you were right, as long as we use static constructors i.e. create()
we don’t need to worry about retain/release of the objects.
So, here’s what i draw conclusion from it ->
-
when we call static constructors i.e.
create()function
it automatically creates and initializes the object , after finding the appropriate texture
it will autorelease the object. -
this is also applicable for functions with name
createWithXyz()
What i didn’t understood in the wiki is what are singletons and how should memory management be used for them also
the wiki pointing to
concern the pair of object->retain() and object->release()
Explaining this will solve the issue…
also any more info is always welcome 