Reading Apple's documentation about removeFromParent it says:
"Removes the receiving node from its parent."
Does this mean the node is destroyed? Do I need to set the node to NULL for its memory to be freed?
An object (under ARC) is released when there is no strong reference holding on to it. A node being a child is a strong reference, removing the node will usually release the node unless there is a strong reference to it elsewhere.
You can easily verify this by implementing -(void) dealloc
and setting a breakpoint or NSLog
statement in it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With