[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Setter Gettor method style
From: |
Nicola Pero |
Subject: |
Re: Setter Gettor method style |
Date: |
Wed, 7 Aug 2002 10:27:09 +0100 (BST) |
> >Not really - I don't see any difference in switching to GC.
>
> Sorry, it seems I couldn't make myself clear on this.
> Lets try again. :)
>
> The pattern Apple (seems to) have chosen wants to fulfill a contract
> that every reference (pointer) you get remains valid for at least the
> time of that particular method you are in.
>
> Then the original Pattern is that if you want to keep something
> around you have to retain it. But you can not expect it to stick
> around if you do other things.
>
> Then when Garbage Collection is enabled, wouldn't this have the same
> effect? Wouldn't this make objects stay around as long as they have a
> reference somewhere? (That is, even longer than with autorelease)
Maybe I'm missing your point and am not enough familiar with GC to get
this answer right :-) I haven't used it much (yet) - so I won't try to say
more :-)
If someone else wants to elaborate/discuss on this matter, I would be
pleased to hear.