gnustep-dev
[Top][All Lists]
Advanced

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

Re: RFC Distributed Object behavior for pointers


From: Alexander Malmberg
Subject: Re: RFC Distributed Object behavior for pointers
Date: Mon, 14 Apr 2003 22:24:41 +0200

Sorry, sent this too soon. Here's the proper reply.

Richard Frith-Macdonald wrote:
> How should GNUstep do it?
> Do we want to make the calling code check to see if it is calling a
> method via DO, and free the memory explicity, or do we want to use
> autoreleased memory for consistency with the way objects are returned,
> and have the caller copy the contents of the memory if it wants to keep
> it?
> The second form seems better to me, but I don't know what OPENSTEP does.

Autoreleasing seems to be the best approach, though having the caller
own it also makes some amount of sense to me. Keeping the objects around
longer (eg. until the local proxy is deallocated) has unreasonable worst
case memory consumption. Consistency doesn't seem very relevant; the
lifetime of the structure will probably be different from what it would
have been in the local case anyway, so if you want to handle distant
objects you might have to add special code for that regardless of
whether it's an explicit free or an explicit copy to storage you do own.
Autoreleasing would be less intrusive in the common case, though.

- Alexander Malmberg




reply via email to

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