Releases and pops the receiver.


- (void)release


In a reference-counted environment, since an autorelease pool cannot be retained (see retain), this method causes the receiver to be deallocated. When an autorelease pool is deallocated, it sends a release message to all its autoreleased objects. If an object is added several times to the same pool, when the pool is deallocated it receives a release message for each time it was added.

In a garbage-collected environment, this method is a no-op.

Special Considerations

You should typically use drain instead of release.

See Also

Managing a Pool

- drain

In a reference-counted environment, releases and pops the receiver; in a garbage-collected environment, triggers garbage collection if the memory allocated since the last collection is greater than the current threshold.

- autorelease

Raises an exception.

- retain

Raises an exception.