Differences From Artifact [bc3a0d2a2f]:
- File
src/OFAutoreleasePool.m
— part of check-in
[f7576a66ce]
at
2012-06-06 13:47:52
on branch trunk
— Slightly change the memory management API.
Also fix a bug where OFBigDataArray would waste memory. (user: js, size: 4218) [annotate] [blame] [check-ins using] [more...]
To Artifact [42c4c969f4]:
- File src/OFAutoreleasePool.m — part of check-in [11d3d69a22] at 2012-06-10 13:28:05 on branch trunk — More API improvements. (user: js, size: 4210) [annotate] [blame] [check-ins using] [more...]
| ︙ | ︙ | |||
117 118 119 120 121 122 123 | #endif } if (previousPool != nil) previousPool->nextPool = self; size = GROW_SIZE; | | | | | 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
#endif
}
if (previousPool != nil)
previousPool->nextPool = self;
size = GROW_SIZE;
objects = [self allocMemoryWithSize: sizeof(id)
count: GROW_SIZE];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- (void)_addObject: (id)object
{
if (count + 1 > size) {
objects = [self resizeMemory: objects
size: sizeof(id)
count: size + GROW_SIZE];
size += GROW_SIZE;
}
objects[count] = object;
count++;
}
|
| ︙ | ︙ |