00001 /* 00002 * Copyright (c) 2008 - 2009 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 00022 @interface OFAutoreleasePool: OFObject 00023 { 00024 OFMutableArray *objects; 00025 OFAutoreleasePool *next, *prev; 00026 } 00027 00034 + (void)addObjectToTopmostPool: (OFObject*)obj; 00035 00036 + (void)releaseAll; 00037 00043 - addObject: (OFObject*)obj; 00044 00053 - releaseObjects; 00054 00058 - (void)release; 00059 00066 - (void)drain; 00067 @end