discuss-gnustep
[Top][All Lists]
Advanced

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

Re: RFC Distributed Object behavior for pointers


From: Wim Oudshoorn
Subject: Re: RFC Distributed Object behavior for pointers
Date: Mon, 14 Apr 2003 12:09:15 +0200
User-agent: Mutt/1.4i

On Mon, Apr 14, 2003 at 10:56:21AM +0100, Richard Frith-Macdonald wrote:
> 
> >What about a third alternative?
> >
> >- tie the lifespan of the returned memory to the lifespan of the proxy
> >  object.
> 
> The problem with that is that if the proxy is a server object, it's 
> lifetime could
> be weeks, months, or years, and it could return billions of strings over
> that lifetime.

Actually I meant the lifespan of the local proxy, not the serverside
object.  
But it still  suffers of the same problem.  The underlying
problem with the solution I proposed, is that the programmer
can not ensure that the memory is freed when he wants it to
be freed.  In order to fix this the "free" method should
be extended to notify the proxy etc.  But this will become
so complicated and tricky that I think the autoroleased mechanism
is to be preferred.
 
> Probably the current autorelease behavior is what we want ... it's 
> consistent
> with the way that memory is managed for objects.

Yes.

BTW.  Do you still want me to check the behaviour on OpenStep?
Regardless of the outcome I would vote for the autorelease
solution.


Wim Oudshoorn.




reply via email to

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