add comments for clarification

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32697 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2011-03-24 06:24:05 +00:00
parent 213d36b7d0
commit 1250bd6d77

View file

@ -299,7 +299,10 @@ pop_pool_from_cache (struct autorelease_thread_vars *tv)
_released = _released_head;
}
/* Install ourselves as the current pool. */
/* Install ourselves as the current pool.
* The only other place where the parent/child linked list is modified
* should be in -dealloc
*/
{
struct autorelease_thread_vars *tv = ARP_THREAD_VARS;
_parent = tv->current_pool;
@ -457,10 +460,11 @@ pop_pool_from_cache (struct autorelease_thread_vars *tv)
[self emptyPool];
/*
* Remove self from the linked list of pools in use.
* We already know that we have deallocated our child (if any),
/* Remove self from the linked list of pools in use.
* We already know that we have deallocated any child (in -emptyPool),
* but we may have a parent which needs to know we have gone.
* The only other place where the parent/child linked list is modified
* should be in -init
*/
if (tv->current_pool == self)
{
@ -471,7 +475,6 @@ pop_pool_from_cache (struct autorelease_thread_vars *tv)
_parent->_child = nil;
_parent = nil;
}
_child = nil;
/* Don't deallocate ourself, just save us for later use. */
push_pool_to_cache (tv, self);