![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/share/doc/gnustep-base-doc/BaseAdditions/Reference/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>GCObject documentation</title> </head> <body> <font face="serif"> <a href="BaseAdditions.html">Up</a> <br /> <h1><a name="title$GCObject">GCObject documentation</a></h1> <h3>Authors</h3> <dl> <dt>Richard Frith-Macdonald (<a href="mailto:rfm@gnu.org"><code>rfm@gnu.org</code></a>)</dt> <dd> </dd> </dl> <p><b>Copyright:</b> (C) 2002 Free Software Foundation, Inc.</p> <div> <hr width="50%" align="left" /> <h3>Contents -</h3> <ol> <li> <a href="#001000000000">Software documentation for the GCArray class</a> </li> <li> <a href="#002000000000">Software documentation for the GCDictionary class</a> </li> <li> <a href="#003000000000">Software documentation for the GCMutableArray class</a> </li> <li> <a href="#004000000000">Software documentation for the GCMutableDictionary class</a> </li> <li> <a href="#005000000000">Software documentation for the GCObject class</a> </li> <li> <a href="#006000000000">Software documentation for the GCObject(Extra) category</a> </li> </ol> <hr width="50%" align="left" /> </div> <h1><a name="001000000000"> Software documentation for the GCArray class </a></h1> <h2><a name="class$GCArray">GCArray</a> : NSArray</h2> <blockquote class="declared"> <dl> <dt><b>Declared in:</b></dt> <dd>GNUstepBase/GCObject.h</dd> </dl> </blockquote> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="50%" align="left" /> <a href="#_GCArray_ivars">Instance Variables</a> <br/><br/> <a name="_GCArray_ivars"/> <br/><hr width="50%" align="left" /> <h2>Instance Variables for GCArray Class</h2> <h3><a name="ivariable$GCArray*_contents">_contents</a></h3> @protected id* <b>_contents</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Warning</em> the underscore at the start of the name of this instance variable indicates that, even though it is not technically <em>private</em>, it is intended for internal use within the package, and you should not use the variable in other code. </div> <hr width="25%" align="left" /> <h3><a name="ivariable$GCArray*_count">_count</a></h3> @protected unsigned int <b>_count</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Warning</em> the underscore at the start of the name of this instance variable indicates that, even though it is not technically <em>private</em>, it is intended for internal use within the package, and you should not use the variable in other code. </div> <hr width="25%" align="left" /> <h3><a name="ivariable$GCArray*_isGCObject">_isGCObject</a></h3> @protected BOOL* <b>_isGCObject</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Warning</em> the underscore at the start of the name of this instance variable indicates that, even though it is not technically <em>private</em>, it is intended for internal use within the package, and you should not use the variable in other code. </div> <hr width="25%" align="left" /> <h3><a name="ivariable$GCArray*gc">gc</a></h3> @protected gcInfo <b>gc</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <br/><hr width="50%" align="left" /><br/> <h1><a name="002000000000"> Software documentation for the GCDictionary class </a></h1> <h2><a name="class$GCDictionary">GCDictionary</a> : NSDictionary</h2> <blockquote class="declared"> <dl> <dt><b>Declared in:</b></dt> <dd>GNUstepBase/GCObject.h</dd> </dl> </blockquote> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="50%" align="left" /> <a href="#_GCDictionary_ivars">Instance Variables</a> <br/><br/> <a name="_GCDictionary_ivars"/> <br/><hr width="50%" align="left" /> <h2>Instance Variables for GCDictionary Class</h2> <h3><a name="ivariable$GCDictionary*_map">_map</a></h3> @protected NSMapTable* <b>_map</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Warning</em> the underscore at the start of the name of this instance variable indicates that, even though it is not technically <em>private</em>, it is intended for internal use within the package, and you should not use the variable in other code. </div> <hr width="25%" align="left" /> <h3><a name="ivariable$GCDictionary*gc">gc</a></h3> @protected gcInfo <b>gc</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <br/><hr width="50%" align="left" /><br/> <h1><a name="003000000000"> Software documentation for the GCMutableArray class </a></h1> <h2><a name="class$GCMutableArray">GCMutableArray</a> : NSMutableArray</h2> <blockquote class="declared"> <dl> <dt><b>Declared in:</b></dt> <dd>GNUstepBase/GCObject.h</dd> </dl> </blockquote> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="50%" align="left" /> <a href="#_GCMutableArray_ivars">Instance Variables</a> <br/><br/> <a name="_GCMutableArray_ivars"/> <br/><hr width="50%" align="left" /> <h2>Instance Variables for GCMutableArray Class</h2> <h3><a name="ivariable$GCMutableArray*_contents">_contents</a></h3> @protected id* <b>_contents</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Warning</em> the underscore at the start of the name of this instance variable indicates that, even though it is not technically <em>private</em>, it is intended for internal use within the package, and you should not use the variable in other code. </div> <hr width="25%" align="left" /> <h3><a name="ivariable$GCMutableArray*_count">_count</a></h3> @protected unsigned int <b>_count</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Warning</em> the underscore at the start of the name of this instance variable indicates that, even though it is not technically <em>private</em>, it is intended for internal use within the package, and you should not use the variable in other code. </div> <hr width="25%" align="left" /> <h3><a name="ivariable$GCMutableArray*_isGCObject">_isGCObject</a></h3> @protected BOOL* <b>_isGCObject</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Warning</em> the underscore at the start of the name of this instance variable indicates that, even though it is not technically <em>private</em>, it is intended for internal use within the package, and you should not use the variable in other code. </div> <hr width="25%" align="left" /> <h3><a name="ivariable$GCMutableArray*_maxCount">_maxCount</a></h3> @protected unsigned int <b>_maxCount</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Warning</em> the underscore at the start of the name of this instance variable indicates that, even though it is not technically <em>private</em>, it is intended for internal use within the package, and you should not use the variable in other code. </div> <hr width="25%" align="left" /> <h3><a name="ivariable$GCMutableArray*gc">gc</a></h3> @protected gcInfo <b>gc</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <br/><hr width="50%" align="left" /><br/> <h1><a name="004000000000"> Software documentation for the GCMutableDictionary class </a></h1> <h2><a name="class$GCMutableDictionary">GCMutableDictionary</a> : NSMutableDictionary</h2> <blockquote class="declared"> <dl> <dt><b>Declared in:</b></dt> <dd>GNUstepBase/GCObject.h</dd> </dl> </blockquote> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="50%" align="left" /> <a href="#_GCMutableDictionary_ivars">Instance Variables</a> <br/><br/> <a name="_GCMutableDictionary_ivars"/> <br/><hr width="50%" align="left" /> <h2>Instance Variables for GCMutableDictionary Class</h2> <h3><a name="ivariable$GCMutableDictionary*_map">_map</a></h3> @protected NSMapTable* <b>_map</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Warning</em> the underscore at the start of the name of this instance variable indicates that, even though it is not technically <em>private</em>, it is intended for internal use within the package, and you should not use the variable in other code. </div> <hr width="25%" align="left" /> <h3><a name="ivariable$GCMutableDictionary*gc">gc</a></h3> @protected gcInfo <b>gc</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <br/><hr width="50%" align="left" /><br/> <h1><a name="005000000000"> Software documentation for the GCObject class </a></h1> <h2><a name="class$GCObject">GCObject</a> : NSObject</h2> <blockquote class="declared"> <dl> <dt><b>Declared in:</b></dt> <dd>GNUstepBase/GCObject.h</dd> </dl> </blockquote> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> </p> <p> The GCObject class is both the base class for all garbage collected objects, and an infrastructure for handling garbage collection. </p> <p> </p> <p> It maintains a list of all garbage collectable objects and provides a method to run a garbage collection pass on those objects. </p> <p> </div> <hr width="50%" align="left" /> <a href="#_GCObject_ivars">Instance Variables</a> <br/><br/> <b>Method summary</b> <ul> <li><a rel="gsdoc" href="GCObject.html#method$GCObject(Extra)-gcAlreadyVisited">-gcAlreadyVisited</a></li> <li><a rel="gsdoc" href="GCObject.html#method$GCObject(Extra)-gcNextObject">-gcNextObject</a></li> <li><a rel="gsdoc" href="GCObject.html#method$GCObject(Extra)-gcPreviousObject">-gcPreviousObject</a></li> <li><a rel="gsdoc" href="GCObject.html#method$GCObject(Extra)-gcSetNextObject$">-gcSetNextObject:</a></li> <li><a rel="gsdoc" href="GCObject.html#method$GCObject(Extra)-gcSetPreviousObject$">-gcSetPreviousObject:</a></li> <li><a rel="gsdoc" href="GCObject.html#method$GCObject(Extra)-gcSetVisited$">-gcSetVisited:</a></li> <li><a rel="gsdoc" href="GCObject.html#method$GCObject+gcCollectGarbage">+gcCollectGarbage</a></li> <li><a rel="gsdoc" href="GCObject.html#method$GCObject+gcIsCollecting">+gcIsCollecting</a></li> <li><a rel="gsdoc" href="GCObject.html#method$GCObject+gcObjectWillBeDeallocated$">+gcObjectWillBeDeallocated:</a></li> <li><a rel="gsdoc" href="GCObject.html#method$GCObject-gcDecrementRefCount">-gcDecrementRefCount</a></li> <li><a rel="gsdoc" href="GCObject.html#method$GCObject-gcDecrementRefCountOfContainedObjects">-gcDecrementRefCountOfContainedObjects</a></li> <li><a rel="gsdoc" href="GCObject.html#method$GCObject-gcIncrementRefCount">-gcIncrementRefCount</a></li> <li><a rel="gsdoc" href="GCObject.html#method$GCObject-gcIncrementRefCountOfContainedObjects">-gcIncrementRefCountOfContainedObjects</a></li> </ul> <hr width="50%" align="left" /> <div class="method"> <h3><a name="method$GCObject+gcCollectGarbage">gcCollectGarbage </a></h3> + (void) <b>gcCollectGarbage</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> </p> <p> This method runs a garbage collection, causing unreferenced objects to be deallocated. This is done using a simple three pass algorithm - </p> <p> <dl> <dt>Pass 1</dt> <dd> All the garbage collectable objects are sent a <a rel="gsdoc" href="#method$GCObject-gcDecrementRefCountOfContainedObjects">-gcDecrementRefCountOfContainedObjects</a> message. </dd> <dt>Pass 2</dt> <dd> All objects having a refCount greater than 0 are sent an <a rel="gsdoc" href="#method$GCObject-gcIncrementRefCountOfContainedObjects">-gcIncrementRefCountOfContainedObjects</a> message. </dd> <dt>Pass 3</dt> <dd> All the objects that still have the refCount of 0 are part of cyclic graphs and none of the objects from this graph are held by some object outside graph. These objects receive the -dealloc message. In this method they should send the -dealloc message to any garbage collectable (GCObject and subclass) instances they contain. </dd> </dl> </p> <p> During garbage collection, the <a rel="gsdoc" href="#method$GCObject+gcIsCollecting"> +gcIsCollecting </a> method returns <code>YES</code>. </p> <p> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$GCObject+gcIsCollecting">gcIsCollecting </a></h3> + (BOOL) <b>gcIsCollecting</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Returns a flag to indicate whether a garbage collection is in progress. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$GCObject+gcObjectWillBeDeallocated$">gcObjectWillBeDeallocated: </a></h3> + (void) <b>gcObjectWillBeDeallocated:</b> (<a rel="gsdoc" href="#class$GCObject">GCObject</a>*)anObject;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Called to remove <var>anObject</var> from the list of garbage collectable objects. <br /> This method is provided so that classes which are not subclasses of GCObject (but which have the same initial instance variable layout) can use multiple inheritance (behaviors) to act as GCObject instances, but can have their own -dealloc methods. <br /> These classes should call this in their own -dealloc methods. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$GCObject-gcDecrementRefCount">gcDecrementRefCount </a></h3> - (void) <b>gcDecrementRefCount</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Decrements the garbage collection reference count for the receiver. <br /> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$GCObject-gcDecrementRefCountOfContainedObjects">gcDecrementRefCountOfContainedObjects </a></h3> - (void) <b>gcDecrementRefCountOfContainedObjects</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> </p> <p> Marks the receiver as not having been visited in the current garbage collection process (first pass of collection). </p> <p> </p> <p> All container subclasses should override this method to call the super implementation then decrement the ref counts of their contents as well as sending the <a rel="gsdoc" href="#method$GCObject-gcDecrementRefCountOfContainedObjects">-gcDecrementRefCountOfContainedObjects</a> message to each of them. </p> <p> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$GCObject-gcIncrementRefCount">gcIncrementRefCount </a></h3> - (void) <b>gcIncrementRefCount</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Increments the garbage collection reference count for the receiver. <br /> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$GCObject-gcIncrementRefCountOfContainedObjects">gcIncrementRefCountOfContainedObjects </a></h3> - (BOOL) <b>gcIncrementRefCountOfContainedObjects</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> </p> <p> Checks to see if the receiver has already been visited in the current garbage collection process, and either marks the receiver as visited (and returns <code>YES</code>) or returns <code>NO</code> to indicate that it had already been visited. </p> <p> </p> <p> All container subclasses should override this method to call the super implementation then, if the method returns <code>YES</code>, increment the reference count of any contained objects and send the <a rel="gsdoc" href="#method$GCObject-gcIncrementRefCountOfContainedObjects">-gcIncrementRefCountOfContainedObjects</a> to each of the contained objects too. </p> <p> </div> <hr width="25%" align="left" /> </div> <a name="_GCObject_ivars"/> <br/><hr width="50%" align="left" /> <h2>Instance Variables for GCObject Class</h2> <h3><a name="ivariable$GCObject*gc">gc</a></h3> @protected gcInfo <b>gc</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <br/><hr width="50%" align="left" /><br/> <h1><a name="006000000000"> Software documentation for the GCObject(Extra) category </a></h1> <h2><a rel="gsdoc" href="#class$GCObject">GCObject</a>(<a name="category$GCObject(Extra)">Extra</a>)</h2> <blockquote class="declared"> <dl> <dt><b>Declared in:</b></dt> <dd>GNUstepBase/GCObject.h</dd> </dl> </blockquote> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> This category implements accessor methods for the instance variables used for garbage collecting. If/when we can ensure that all garbage collecting classes use the same initial ivar layout, we can remove these methods and the garbage collector can access the ivars directly, making a pretty big performance improvement during collecting. <br /> NB. These methods must *only* be used by the garbage collecting process or in methods called from the garbage collector. Anything else is not thread-safe. </div> <b>Method summary</b> <ul> <li><a rel="gsdoc" href="GCObject.html#method$GCObject(Extra)-gcAlreadyVisited">-gcAlreadyVisited</a></li> <li><a rel="gsdoc" href="GCObject.html#method$GCObject(Extra)-gcNextObject">-gcNextObject</a></li> <li><a rel="gsdoc" href="GCObject.html#method$GCObject(Extra)-gcPreviousObject">-gcPreviousObject</a></li> <li><a rel="gsdoc" href="GCObject.html#method$GCObject(Extra)-gcSetNextObject$">-gcSetNextObject:</a></li> <li><a rel="gsdoc" href="GCObject.html#method$GCObject(Extra)-gcSetPreviousObject$">-gcSetPreviousObject:</a></li> <li><a rel="gsdoc" href="GCObject.html#method$GCObject(Extra)-gcSetVisited$">-gcSetVisited:</a></li> </ul> <hr width="50%" align="left" /> <div class="method"> <h3><a name="method$GCObject(Extra)-gcAlreadyVisited">gcAlreadyVisited </a></h3> - (BOOL) <b>gcAlreadyVisited</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$GCObject(Extra)-gcNextObject">gcNextObject </a></h3> - (<a rel="gsdoc" href="#class$GCObject">GCObject</a>*) <b>gcNextObject</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$GCObject(Extra)-gcPreviousObject">gcPreviousObject </a></h3> - (<a rel="gsdoc" href="#class$GCObject">GCObject</a>*) <b>gcPreviousObject</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$GCObject(Extra)-gcSetNextObject$">gcSetNextObject: </a></h3> - (<a rel="gsdoc" href="#class$GCObject">GCObject</a>*) <b>gcSetNextObject:</b> (<a rel="gsdoc" href="#class$GCObject">GCObject</a>*)anObject;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$GCObject(Extra)-gcSetPreviousObject$">gcSetPreviousObject: </a></h3> - (<a rel="gsdoc" href="#class$GCObject">GCObject</a>*) <b>gcSetPreviousObject:</b> (<a rel="gsdoc" href="#class$GCObject">GCObject</a>*)anObject;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$GCObject(Extra)-gcSetVisited$">gcSetVisited: </a></h3> - (void) <b>gcSetVisited:</b> (BOOL)flag;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> </div> <br /> <a href="BaseAdditions.html">Up</a> </font> </body> </html>