Re-add -autorelease to the Object protocol.

This commit is contained in:
Jeff Teunissen 2003-07-29 18:23:44 +00:00
parent 7713a539ca
commit d05f17cdae
2 changed files with 4 additions and 4 deletions

View file

@ -85,9 +85,7 @@ typedef enum {
- (BOOL) conformsToProtocol: (Protocol)aProtocol;
- (id) retain;
#if 0
- (id) autorelease;
#endif // autorelease pools
- (/*oneway*/ void) release;
- (/*unsigned*/integer) retainCount;
@end

View file

@ -42,7 +42,9 @@
- (void) addObject: (id)anObject
{
top = [[[ListNode alloc] initWithObject: anObject] setNextNode: top];
local id oldTop = top;
top = [[ListNode alloc] initWithObject: anObject];
[top setNextNode: oldTop];
stackSize++;
}
@ -55,7 +57,7 @@
return NIL;
oldTop = top;
top = [top next];
top = [top nextNode];
stackSize--;
data = [[oldTop object] retain];