OFAutoreleasePool Class Reference

#import <OFAutoreleasePool.h>

Inheritance diagram for OFAutoreleasePool:
OFObject

List of all members.

Public Member Functions

(id) - addObject:
(id) - releaseObjects
(void) - release
(void) - drain

Static Public Member Functions

(void) + addObjectToTopmostPool:
(void) + releaseAll

Protected Attributes

OFArrayobjects
OFAutoreleasePoolnext
OFAutoreleasePoolprev

Detailed Description

The OFAutoreleasePool class is a class that keeps track of objects that will be released when the autorelease pool is released.

Every thread has its own stack of autorelease pools.


Member Function Documentation

- (id) addObject: (OFObject*)  obj  

Adds an object to the specific autorelease pool.

Parameters:
obj The object to add to the autorelease pool
+ (void) addObjectToTopmostPool: (OFObject*)  obj  

Adds an object to the autorelease pool at the top of the thread-specific stack.

Parameters:
obj The object to add to the autorelease pool
- (void) drain  

Calling drain is equivalent to calling release.

If a garbage collector is added in the future, it will tell the GC that now is a good time to clean up.

- (void) release  

Releases all objects in the autorelease pool and deallocates the pool.

Reimplemented from OFObject.

- (id) releaseObjects  

Releases all objects in the autorelease pool.

If a garbage collector is added in the future, it will tell the GC that now is a good time to clean up, as this is often used after a lot of objects have been added to the pool that should be released before the next iteration of a loop, which adds objects again. Thus, it is usually a clean up call.


The documentation for this class was generated from the following files:
 All Classes Functions Variables

Generated on Thu Dec 24 11:10:00 2009 for ObjFW by  doxygen 1.6.1