I have learned manual memory management in Objective-C and every article said: "When the retain count of an object drops to 0, the dealloc method is called and the object is destroyed". And nothing more.
But there is no answer for several questions: Can I drop the retain count below 0? Is it possible to call [object release] several times in a row, before the object dies, and cause the retain count to drop below 0? And if I've done so, will the Universe still exist?
Google gives me nothing, like: "Why would you even ask this question? Nobody cares. Go and read about memory management once more."
If you call
releasewhen the retain count is1,deallocis immediately called. So the retain count doesn't ever even get to0.Further calls to
releasewill cause a runtime crash as you would be dereferencing a deallocated object.So no, the universe won't exist at that point :)