Differences From Artifact [b21568683c]:
- File
src/OFMutableDictionary_hashtable.m
— part of check-in
[1255f3a11a]
at
2012-08-10 20:08:24
on branch trunk
— Directly use the runtime's autorelease pools.
This greatly improves performance, as it gets rid of the overhead of
OFAutoreleasePool. (user: js, size: 7257) [annotate] [blame] [check-ins using]
To Artifact [c4df3481c5]:
- File src/OFMutableDictionary_hashtable.m — part of check-in [c137da5e5b] at 2012-09-16 15:27:48 on branch trunk — Prefix all private methods with OF_. (user: js, size: 7277) [annotate] [blame] [check-ins using]
︙ | |||
36 37 38 39 40 41 42 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - + | { if (self == [OFMutableDictionary_hashtable class]) { dictionary = [OFDictionary_hashtable class]; [self inheritMethodsFromClass: dictionary]; } } |
︙ | |||
93 94 95 96 97 98 99 | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | - - - + + + | } [self freeMemory: data]; data = newData; size = newSize; } |
︙ | |||
134 135 136 137 138 139 140 | 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | - + | } /* Key not in dictionary */ if (i >= last || data[i] == NULL || data[i] == DELETED || ![data[i]->key isEqual: key]) { struct of_dictionary_hashtable_bucket *bucket; |
︙ | |||
183 184 185 186 187 188 189 | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | - - - + + + | data[i]->object = [object retain]; [old release]; } - (void)setObject: (id)object forKey: (id)key { |
︙ | |||
212 213 214 215 216 217 218 | 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | - + | [data[i]->key release]; [data[i]->object release]; [self freeMemory: data[i]]; data[i] = DELETED; count--; mutations++; |
︙ | |||
236 237 238 239 240 241 242 | 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 | - + | [data[i]->key release]; [data[i]->object release]; [self freeMemory: data[i]]; data[i] = DELETED; count--; mutations++; |
︙ |