00001 /* 00002 * Copyright (c) 2008 - 2010 00003 * Jonathan Schleifer <js@webkeks.org> 00004 * 00005 * All rights reserved. 00006 * 00007 * This file is part of ObjFW. It may be distributed under the terms of the 00008 * Q Public License 1.0, which can be found in the file LICENSE included in 00009 * the packaging of this file. 00010 */ 00011 00012 #import "OFObject.h" 00013 00014 @class OFMutableArray; 00015 00024 @interface OFAutoreleasePool: OFObject 00025 { 00026 OFMutableArray *objects; 00027 OFAutoreleasePool *next, *prev; 00028 } 00029 00036 + (void)addObjectToTopmostPool: (OFObject*)obj; 00037 00038 + (void)releaseAll; 00039 00045 - addObject: (OFObject*)obj; 00046 00055 - releaseObjects; 00056 00060 - (void)release; 00061 00068 - (void)drain; 00069 @end