Index: src/OFAutoreleasePool.h ================================================================== --- src/OFAutoreleasePool.h +++ src/OFAutoreleasePool.h @@ -38,20 +38,14 @@ * \param object The object to add to the autorelease pool */ + (void)addObject: (id)object; /// \cond internal -+ (void)releaseAll; ++ (void)_releaseAll; +- (void)_addObject: (id)object; /// \endcond -/** - * \brief Adds an object to the specific autorelease pool. - * - * \param obj The object to add to the autorelease pool - */ -- (void)addObject: (id)object; - /** * \brief Releases all objects in the autorelease pool. * * This does not free the memory allocated to store pointers to the objects in * the pool, so reusing the pool does not allocate any memory until the previous Index: src/OFAutoreleasePool.m ================================================================== --- src/OFAutoreleasePool.m +++ src/OFAutoreleasePool.m @@ -68,18 +68,18 @@ [object release]; @throw [OFInitializationFailedException newWithClass: self]; } @try { - [lastPool addObject: object]; + [lastPool _addObject: object]; } @catch (id e) { [object release]; @throw e; } } -+ (void)releaseAll ++ (void)_releaseAll { #ifdef OF_THREADS [of_tlskey_get(firstKey) release]; #else [firstPool release]; @@ -127,11 +127,11 @@ } return self; } -- (void)addObject: (id)object +- (void)_addObject: (id)object { if (count + 1 > size) { objects = [self resizeMemory: objects toNItems: size + GROW_SIZE ofSize: sizeof(id)]; Index: src/OFThread.m ================================================================== --- src/OFThread.m +++ src/OFThread.m @@ -85,11 +85,11 @@ [thread handleTermination]; thread->running = OF_THREAD_WAITING_FOR_JOIN; [OFTLSKey callAllDestructors]; - [OFAutoreleasePool releaseAll]; + [OFAutoreleasePool _releaseAll]; [thread release]; #if defined(OF_GNU_RUNTIME) || defined(OF_OLD_GNU_RUNTIME) objc_thread_remove(); @@ -220,11 +220,11 @@ thread->running = OF_THREAD_WAITING_FOR_JOIN; } [OFTLSKey callAllDestructors]; - [OFAutoreleasePool releaseAll]; + [OFAutoreleasePool _releaseAll]; [thread release]; #if defined(OF_GNU_RUNTIME) || defined(OF_OLD_GNU_RUNTIME) objc_thread_remove();