bug-gnustep
[Top][All Lists]
Advanced

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

Re: [PATCH] Fix NSMenu retainCount problem


From: Quentin Mathé
Subject: Re: [PATCH] Fix NSMenu retainCount problem
Date: Sat, 7 Feb 2004 08:22:38 +0100

Le 7 févr. 04, à 00:30, Fred Kiefer a écrit :

if what you want is the actuall behaviour on MacOSX, than we really need your full patch to get it.

Yes, it's the Mac OS X behavior I want because it seems natural to me.
I my opinion, correct objective-c memory management should be to dealloc the mainObject when the last statement is executed in the example below :

id mainObject;

[mainObject alloc];
[mainObject setBlabla:otherObject];
[mainObject release];

the user shouldn't have to know the framework implementation. In other terms, correct objective-c memory management needs to support this rule : sending a message to an object should never induce increased retain count for this object.

What I was aiming at, was to have a correct reference count on the long run (after another release of an autorelease pool),

ok, I understand.

 but if we need it locally, than yours is the only way I see.

May be, it's possible to improve it...

 As this is a bigger change I would like to hear another opinion.

ok

There will be dozens of other places in the the GNUstep code, that will need similar cleanup, but it is surely worth the effort and I would go for it.

Nice.

Quentin.

--
Quentin Mathé
qmathe@club-internet.fr




reply via email to

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