Differences From Artifact [0e0d5e7d64]:
- File
src/OFAutoreleasePool.m
— part of check-in
[2a4aa05a84]
at
2009-05-05 12:05:06
on branch trunk
— Rename OFArray to OFDataArray and add a new OFArray which stores objects.
Additionally, change OFAutoreleasePool to use the new OFArray.And while at it, change #import <config.h> in some files to
#import "config.h". (user: js, size: 2184) [annotate] [blame] [check-ins using]
To Artifact [82173abc64]:
- File src/OFAutoreleasePool.m — part of check-in [4f4f619d84] at 2009-05-13 17:58:50 on branch trunk — Also release pools that are on top of the pool being released. (user: js, size: 2746) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
listobj = [pool_list append: self];
return self;
}
- free
{
[[OFThread objectForTLSKey: pool_list_key] remove: listobj];
return [super free];
}
- addToPool: (OFObject*)obj
{
| > > > > > > > > > | 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
listobj = [pool_list append: self];
return self;
}
- free
{
/*
* 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];
return [super free];
}
- addToPool: (OFObject*)obj
{
|
| ︙ | ︙ | |||
118 119 120 121 122 123 124 125 | return self; [objects release]; objects = nil; return self; } @end | > > > > > > > > > > > > > > | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
return self;
[objects release];
objects = nil;
return self;
}
- retain
{
// FIXME: Maybe another exception would be better here?
@throw [OFNotImplementedException newWithClass: isa
andSelector: _cmd];
}
- autorelease
{
// FIXME: Maybe another exception would be better here?
@throw [OFNotImplementedException newWithClass: isa
andSelector: _cmd];
}
@end
|