CXAutoreleasePool

alpha version, October 2000

<<<even more unfinished than others>>>

explicit use looks like this:

{
  CXAutoreleasePool *pool=[CXAutoreleasePool pool];
  ...
  // any object which got autoreleased
  // here...
  ...
  [pool release]; // ...is truly released here!
}

Pools are exception-safe.

You do not need to use pools at all, but then all the autoreleased objects will be released

The application variant is quite useable, unless processing of some particualr event makes really a big number of autoreleased objects (generally in a loop or so). In these cases, you should to use the pools directly like in the example above to limit the memory needs.

There is a method xlog which logs out all the objects in the pool, and the method xlogrelease, which releases all the objects just like the release method, but logs them as well.

Copyright © 1999-2000 X.soft, all rights reserved