mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 01:31:08 +00:00
Document deallocation notifications
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@11402 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
04a61e7512
commit
fa6f34e403
2 changed files with 116 additions and 0 deletions
|
@ -568,6 +568,56 @@
|
||||||
<desc>
|
<desc>
|
||||||
</desc>
|
</desc>
|
||||||
</method>
|
</method>
|
||||||
|
<method type="BOOL">
|
||||||
|
<sel>deallocNotificationsActive</sel>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
Returns a boolean indicating whether deallocation notification
|
||||||
|
has been turned on.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
If deallocation notification is turned on, whenever an objects
|
||||||
|
retain count reaches zero (and it would normally be deallocated)
|
||||||
|
the <em>_dealloc</em> methiod is called and the object is only
|
||||||
|
deallocated if that method returns YES.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
</method>
|
||||||
|
<method type="void">
|
||||||
|
<sel>setDeallocNotificationsActive:</sel>
|
||||||
|
<arg type="BOOL">flag</arg>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
Turns on (or off) deallocation notification.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
If deallocation notification is turned on, whenever an objects
|
||||||
|
retain count reaches zero (and it would normally be deallocated)
|
||||||
|
the <em>_dealloc</em> methiod is called and the object is only
|
||||||
|
deallocated if that method returns YES.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
</method>
|
||||||
|
<method type="BOOL">
|
||||||
|
<sel>_dealloc</sel>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
Returns a boolean indicating whether the receiver should be
|
||||||
|
deallocated or not. The default implementation returns YES.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
This method is called when an objects retain count reaches
|
||||||
|
zero (if deallocation notifications are active).
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
This method is provided so that you can take some sort of
|
||||||
|
action when objects are deallocated ... normally you would
|
||||||
|
override this method in your classes, but you could also
|
||||||
|
override it in a category of NSObject - and perform some
|
||||||
|
action whenever <em>any</em> object is deallocated.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
</method>
|
||||||
</class>
|
</class>
|
||||||
</chapter>
|
</chapter>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -116,6 +116,7 @@
|
||||||
<li ><a href ="NSObject.html#method-18">+setVersion:</a>
|
<li ><a href ="NSObject.html#method-18">+setVersion:</a>
|
||||||
<li ><a href ="NSObject.html#method-19">+superclass</a>
|
<li ><a href ="NSObject.html#method-19">+superclass</a>
|
||||||
<li ><a href ="NSObject.html#method-20">+version</a>
|
<li ><a href ="NSObject.html#method-20">+version</a>
|
||||||
|
<li ><a href ="NSObject.html#method-47">-_dealloc</a>
|
||||||
<li ><a href ="NSObject.html#method-21">-awakeAfterUsingCoder:</a>
|
<li ><a href ="NSObject.html#method-21">-awakeAfterUsingCoder:</a>
|
||||||
<li ><a href ="NSObject.html#method-22">-classForArchiver</a>
|
<li ><a href ="NSObject.html#method-22">-classForArchiver</a>
|
||||||
<li ><a href ="NSObject.html#method-23">-classForCoder</a>
|
<li ><a href ="NSObject.html#method-23">-classForCoder</a>
|
||||||
|
@ -123,6 +124,7 @@
|
||||||
<li ><a href ="NSObject.html#method-25">-connection:handleRequest:</a>
|
<li ><a href ="NSObject.html#method-25">-connection:handleRequest:</a>
|
||||||
<li ><a href ="NSObject.html#method-26">-copy</a>
|
<li ><a href ="NSObject.html#method-26">-copy</a>
|
||||||
<li ><a href ="NSObject.html#method-27">-dealloc</a>
|
<li ><a href ="NSObject.html#method-27">-dealloc</a>
|
||||||
|
<li ><a href ="NSObject.html#method-45">-deallocNotificationsActive</a>
|
||||||
<li ><a href ="NSObject.html#method-28">-description</a>
|
<li ><a href ="NSObject.html#method-28">-description</a>
|
||||||
<li ><a href ="NSObject.html#method-29">-descriptionWithLocale:</a>
|
<li ><a href ="NSObject.html#method-29">-descriptionWithLocale:</a>
|
||||||
<li ><a href ="NSObject.html#method-30">-descriptionWithLocale:indent:</a>
|
<li ><a href ="NSObject.html#method-30">-descriptionWithLocale:indent:</a>
|
||||||
|
@ -140,6 +142,7 @@
|
||||||
<li ><a href ="NSObject.html#method-42">-replacementObjectForArchiver:</a>
|
<li ><a href ="NSObject.html#method-42">-replacementObjectForArchiver:</a>
|
||||||
<li ><a href ="NSObject.html#method-43">-replacementObjectForCoder:</a>
|
<li ><a href ="NSObject.html#method-43">-replacementObjectForCoder:</a>
|
||||||
<li ><a href ="NSObject.html#method-44">-replacementObjectForPortCoder:</a>
|
<li ><a href ="NSObject.html#method-44">-replacementObjectForPortCoder:</a>
|
||||||
|
<li ><a href ="NSObject.html#method-46">-setDeallocNotificationsActive:</a>
|
||||||
</ul>
|
</ul>
|
||||||
<hr><h2>Class Methods </h2>
|
<hr><h2>Class Methods </h2>
|
||||||
<h3><a name ="method-0">alloc</a></h3>
|
<h3><a name ="method-0">alloc</a></h3>
|
||||||
|
@ -625,6 +628,69 @@ Standards: GNUstep<br>
|
||||||
- (id) <b>replacementObjectForPortCoder:</b> (NSPortCoder*)aCoder;<br>
|
- (id) <b>replacementObjectForPortCoder:</b> (NSPortCoder*)aCoder;<br>
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h3><a name ="method-45">deallocNotificationsActive</a></h3>
|
||||||
|
- (BOOL) <b>deallocNotificationsActive</b>;<br>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
|
||||||
|
Returns a boolean indicating whether deallocation notification
|
||||||
|
has been turned on.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
|
||||||
|
If deallocation notification is turned on, whenever an objects
|
||||||
|
retain count reaches zero (and it would normally be deallocated)
|
||||||
|
the <em>_dealloc</em> methiod is called and the object is only
|
||||||
|
deallocated if that method returns YES.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h3><a name ="method-46">setDeallocNotificationsActive:</a></h3>
|
||||||
|
- (void) <b>setDeallocNotificationsActive:</b> (BOOL)flag;<br>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
|
||||||
|
Turns on (or off) deallocation notification.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
|
||||||
|
If deallocation notification is turned on, whenever an objects
|
||||||
|
retain count reaches zero (and it would normally be deallocated)
|
||||||
|
the <em>_dealloc</em> methiod is called and the object is only
|
||||||
|
deallocated if that method returns YES.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h3><a name ="method-47">_dealloc</a></h3>
|
||||||
|
- (BOOL) <b>_dealloc</b>;<br>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
|
||||||
|
Returns a boolean indicating whether the receiver should be
|
||||||
|
deallocated or not. The default implementation returns YES.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
|
||||||
|
This method is called when an objects retain count reaches
|
||||||
|
zero (if deallocation notifications are active).
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
|
||||||
|
This method is provided so that you can take some sort of
|
||||||
|
action when objects are deallocated ... normally you would
|
||||||
|
override this method in your classes, but you could also
|
||||||
|
override it in a category of NSObject - and perform some
|
||||||
|
action whenever <em>any</em> object is deallocated.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue