Overview
Comment: | - release should not be chained, might be free'd. Therefore return void. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
e73e76e40f2dcaa5d416ed5c230dde90 |
User & Date: | js on 2009-03-04 20:49:21 |
Other Links: | manifest | tags |
Context
2009-03-08
| ||
16:06 | Rename initWithRetainAndReleaseEnabled to initWithoutRetainAndRelease. check-in: 43e4d25ca7 user: js tags: trunk | |
2009-03-04
| ||
20:49 | - release should not be chained, might be free'd. Therefore return void. check-in: e73e76e40f user: js tags: trunk | |
2009-02-28
| ||
01:49 | Fix a memory leak in OFString that occours when we're out of memory. check-in: 48309788c8 user: js tags: trunk | |
Changes
Modified src/OFAutoreleasePool.m from [69d36d4f2d] to [c9b8f8d309].
︙ | ︙ | |||
114 115 116 117 118 119 120 | objects = [[OFArray alloc] initWithItemSize: sizeof(char*)]; [objects add: &obj]; return self; } | | < | | 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | objects = [[OFArray alloc] initWithItemSize: sizeof(char*)]; [objects add: &obj]; return self; } - (void)release { [self releaseObjects]; [super release]; } - releaseObjects { size_t i, size; IMP get_item; |
︙ | ︙ |
Modified src/OFObject.h from [25e68717c7] to [a404ee9968].
︙ | ︙ | |||
35 36 37 38 39 40 41 | * Increases the retain count. */ - retain; /** * Decreases the retain cound and frees the object if it reaches 0. */ | | | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | * Increases the retain count. */ - retain; /** * Decreases the retain cound and frees the object if it reaches 0. */ - (void)release; /** * Adds the object to the autorelease pool that is on top of the thread's stack. */ - autorelease; /** |
︙ | ︙ |
Modified src/OFObject.m from [b132f8aa53] to [1ab2516eb4].
︙ | ︙ | |||
48 49 50 51 52 53 54 | - retain { __retain_count++; return self; } | | | < < | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | - retain { __retain_count++; return self; } - (void)release { if (!--__retain_count) [self free]; } - autorelease { [OFAutoreleasePool addToPool: self]; return self; |
︙ | ︙ |
Modified tests/OFAutoreleasePool/OFAutoreleasePool.m from [389325218a] to [42a1c16a8e].
︙ | ︙ | |||
20 21 22 23 24 25 26 | #else #define ZD "%u" #endif @interface TestObject: OFObject - init; - retain; | | | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #else #define ZD "%u" #endif @interface TestObject: OFObject - init; - retain; - (void)release; @end @implementation TestObject - init { id ret; |
︙ | ︙ | |||
45 46 47 48 49 50 51 | ret = [super retain]; printf("Retaining %s to " ZD "\n", [self name], [ret retainCount]); return ret; } | | | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | ret = [super retain]; printf("Retaining %s to " ZD "\n", [self name], [ret retainCount]); return ret; } - (void)release { printf("Releasing %s to " ZD "\n", [self name], [self retainCount] - 1); return [super release]; } @end |
︙ | ︙ |