2000-02-28 16:30:00 +00:00
|
|
|
<?xml version="1.0"?>
|
2000-07-04 19:53:39 +00:00
|
|
|
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.6//EN" "http://www.gnustep.org/gsdoc-0_6_6.xml">
|
|
|
|
<gsdoc base="NSAutoreleasePool" prev="NSAttributedString" next="NSBundle" up="Base">
|
2000-02-28 16:30:00 +00:00
|
|
|
<head>
|
|
|
|
<title>NSAutoreleasePool</title>
|
|
|
|
<author name="Richard Frith-Macdonald">
|
|
|
|
<email address="rfm@gnu.org"/>
|
|
|
|
<url url="http://www.gnustep.org/developers/whoiswho.html"/>
|
|
|
|
</author>
|
2001-03-03 09:58:53 +00:00
|
|
|
<version>$Revision$</version>
|
2001-03-03 09:56:29 +00:00
|
|
|
<date>$Date$</date>
|
2000-02-28 16:30:00 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<chapter>
|
|
|
|
<heading>NSAutoreleasePool</heading>
|
|
|
|
<class name="NSAutoreleasePool" super="NSObject">
|
|
|
|
<declared>Foundation/NSAutoreleasePool.h</declared>
|
|
|
|
<conform>NSObject</conform>
|
2000-02-29 11:01:41 +00:00
|
|
|
<desc>
|
2001-05-10 19:48:29 +00:00
|
|
|
<p>
|
|
|
|
This class maintains a stack of autorelease pools objects
|
|
|
|
in each thread.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
When an autorelease pool is created, it is automatically
|
|
|
|
added to the stack of pools in the thread.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
When a pool is destroyed, it (and any pool later in
|
|
|
|
the stack) is removed from the stack.
|
|
|
|
</p>
|
2000-02-29 11:01:41 +00:00
|
|
|
</desc>
|
|
|
|
<method type="void" factory="yes">
|
|
|
|
<sel>addObject:</sel>
|
|
|
|
<arg type="id">anObject</arg>
|
|
|
|
<desc>
|
2001-05-10 19:48:29 +00:00
|
|
|
<p>
|
|
|
|
Adds the specified object to the current autorelease pool.
|
|
|
|
If there is no autorelease pool in the thread,
|
|
|
|
a warning is logged.
|
|
|
|
</p>
|
2000-02-29 11:01:41 +00:00
|
|
|
</desc>
|
2000-02-28 18:30:41 +00:00
|
|
|
</method>
|
2000-02-29 11:01:41 +00:00
|
|
|
<method type="void">
|
|
|
|
<sel>addObject:</sel>
|
|
|
|
<arg type="id">anObject</arg>
|
|
|
|
<desc>
|
2001-05-10 19:48:29 +00:00
|
|
|
<p>
|
|
|
|
Adds the specified object to this autorelease pool.
|
|
|
|
</p>
|
2000-02-29 11:01:41 +00:00
|
|
|
</desc>
|
2000-02-28 18:30:41 +00:00
|
|
|
</method>
|
2001-05-10 19:48:29 +00:00
|
|
|
<method type="void" factory="yes">
|
|
|
|
<sel>enableRelease:</sel>
|
|
|
|
<arg type="BOOL">flag</arg>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Specifies whether objects contained in autorelease pools are to
|
|
|
|
be released when the pools are deallocated (by default YES).
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
You can set this to NO for debugging purposes.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<standards><GNUstep/><NotMacOS-X/><NotOpenStep/></standards>
|
|
|
|
</method>
|
|
|
|
<method type="unsigned" factory="yes">
|
|
|
|
<sel>autoreleaseCountForObject:</sel>
|
|
|
|
<arg type="id">anObject</arg>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Counts the number of times that the specified object occurs
|
|
|
|
in autorelease pools in the current thread.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
This method is <em>slow</em> and should probably only be
|
|
|
|
used for debugging purposes.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<standards><GNUstep/><NotMacOS-X/><NotOpenStep/></standards>
|
|
|
|
</method>
|
|
|
|
<method type="void" factory="yes">
|
|
|
|
<sel>freeCache</sel>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
When autorelease pools are deallocated, the memory they used
|
|
|
|
is retained in a cache for re-use so that new polls can be
|
|
|
|
created very quickly.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
This method may be used to empty that cache, ensuring that
|
|
|
|
the minimum memory is used by the application.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<standards><GNUstep/><NotMacOS-X/><NotOpenStep/></standards>
|
|
|
|
</method>
|
|
|
|
<method type="void" factory="yes">
|
|
|
|
<sel>setPoolCountThreshold:</sel>
|
|
|
|
<arg type="unsigned">c</arg>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Specifies a limit to the number of objects that may be added to
|
|
|
|
an autorelease pool. When this limit is reached an exception is
|
|
|
|
raised.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
You can set this to a smallish value to catch problems with code
|
|
|
|
that autoreleases too many objects to operate efficiently.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
Default value is maxint.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<standards><GNUstep/><NotMacOS-X/><NotOpenStep/></standards>
|
|
|
|
</method>
|
2000-02-28 16:30:00 +00:00
|
|
|
</class>
|
|
|
|
</chapter>
|
|
|
|
</body>
|
|
|
|
</gsdoc>
|