Differences From Artifact [5a81eccbfb]:
- File
src/OFAutoreleasePool.m
— part of check-in
[f173477bef]
at
2011-09-19 16:34:04
on branch trunk
— Rename -[allocMemoryForNItems:withSize:] and friends.
It is now -[allocMemoryForNItems:ofSize:]. (user: js, size: 4164) [annotate] [blame] [check-ins using]
To Artifact [74a7fa7b2d]:
- File
src/OFAutoreleasePool.m
— part of check-in
[2e484248de]
at
2011-09-22 12:09:34
on branch trunk
— Make it impossible to add objects to arbitrary autorelease pools.
This is almost never done, and was made impossible in ARC-compatible
code. (user: js, size: 4167) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
66 67 68 69 70 71 72 | if (lastPool == nil) { [object release]; @throw [OFInitializationFailedException newWithClass: self]; } @try { | | | | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | if (lastPool == nil) { [object release]; @throw [OFInitializationFailedException newWithClass: self]; } @try { [lastPool _addObject: object]; } @catch (id e) { [object release]; @throw e; } } + (void)_releaseAll { #ifdef OF_THREADS [of_tlskey_get(firstKey) release]; #else [firstPool release]; #endif } |
︙ | ︙ | |||
125 126 127 128 129 130 131 | [self release]; @throw e; } return self; } | | | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | [self release]; @throw e; } return self; } - (void)_addObject: (id)object { if (count + 1 > size) { objects = [self resizeMemory: objects toNItems: size + GROW_SIZE ofSize: sizeof(id)]; size += GROW_SIZE; } |
︙ | ︙ |