In the Apple documentation, NSObject NSZoneFree is called in the sample code () vall) dealloc:
- (void)dealloc { [companion release]; NSZoneFree(private, [self zone]) [super dealloc]; }
You can find it in context here .
I never had an idea of ββwhat I should call NSZoneFree in my subclasses of NSObject (or in some subclasses of NS_WhateverClass_) and cannot find anything convincing about this topic anywhere in the document.
All I can find about using NSZoneFree is a brief mention in the Memory Programming Guide and an explanation of the function in Basic Function Reference , but none of these documents let me know if I should worry about this in the context of the dealloc method.
Can anyone clarify when I should put the NSZoneFree call in my dealloc implementations for my own classes?
Edit: Thanks for your answers, now clearer for me :) - Dirk
source share