discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setter/getter discussion


From: Pete French
Subject: Re: setter/getter discussion
Date: Tue, 06 Aug 2002 17:59:22 +0100

> Yes, you can  insert an object into an  autorelease pool several times
> like you can  insert an object into an array  at several indices. (And

Actyally I implemented my autorelease pools as an array. So you just
release the "pool" which is an array and hey presto all the objects
get "release" methods. I suspect that its not done this way in GNUstep
or Foundation, but it works for me :-)

> of course, into several arrays and several autorelease pools).  What's
> important is the retain count and how and when it goes to 0.

Mine looks like this:

- (void)release
{
        if(_retain_count) {
                _retain_count--;
                return;
        }
 
        [self dealloc];
        [self free];
}

-bat. [this is going way off topic I realise...]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]