In Objective-C it seems that the opposite of alloc is release (which undoes the memory allocation that alloc did), and the opposite of init is dealloc (which undoes the instance initialization done by init). Wouldn't a better name for dealloc be uninit or deinit?
Tell me more
×
Programmers Stack Exchange is a question and answer site for
professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.
|
|
|||
closed as not constructive by Walter, Bill, GlenH7, MainMa, ChrisF♦ Nov 10 '12 at 10:48
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.
|
The opposite of More on |
|||
|
|
|
|||
|
|
releasedoesn't undo the memory allocation.deallocdoes that, but inNSObject.releasemerely triggersdeallocwhen the reference count reaches 0. – K.Steff Nov 10 '12 at 1:35