Differences From Artifact [99c26c51d9]:
- File
src/OFAutoreleasePool.m
— part of check-in
[6d589825cd]
at
2009-05-13 20:39:59
on branch trunk
— Let - release return void again.
If you want to know if it will be released, you can just get the retain
count and check it this way. (user: js, size: 2746) [annotate] [blame] [check-ins using]
To Artifact [1d59e36e29]:
- File
src/OFAutoreleasePool.m
— part of check-in
[af41efe079]
at
2009-05-14 13:46:00
on branch trunk
— Two small fixes for OFAutoreleasePool.
First, when an OFAutoreleasePool is deallocated, it should always
release all the objects.Second, releaseObject should also release the objects of the pools on
top of the current pool. (user: js, size: 2842) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
91 92 93 94 95 96 97 98 99 100 101 102 103 104 | * FIXME: * Maybe we should get the objects ourself, release them and then * release the pool without calling its release method? This way, * there wouldn't be a recursion. */ if (listobj->next != NULL) [listobj->next->object release]; [[OFThread objectForTLSKey: pool_list_key] remove: listobj]; [super dealloc]; } - addToPool: (OFObject*)obj | > > | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | * FIXME: * Maybe we should get the objects ourself, release them and then * release the pool without calling its release method? This way, * there wouldn't be a recursion. */ if (listobj->next != NULL) [listobj->next->object release]; [self releaseObjects]; [[OFThread objectForTLSKey: pool_list_key] remove: listobj]; [super dealloc]; } - addToPool: (OFObject*)obj |
︙ | ︙ | |||
116 117 118 119 120 121 122 123 124 125 126 127 128 129 | { [self releaseObjects]; [super release]; } - releaseObjects { if (objects == nil) return self; [objects release]; objects = nil; return self; | > > > | 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | { [self releaseObjects]; [super release]; } - releaseObjects { if (listobj->next != NULL) [listobj->next->object releaseObjects]; if (objects == nil) return self; [objects release]; objects = nil; return self; |
︙ | ︙ |