Re: [PATCH] Fix NSMenu retainCount problem

2004-02-07 Thread Quentin Mathé
Le 7 févr. 04, à 17:55, Richard Frith-Macdonald a écrit : But depending on an undocumented feature of the MacOS-X implementation of NSMenu ... you are expecting the menu to be destroyed when you release it, and that might not be so. The code may not work in the next release... it may even (depe

Re: [PATCH] Fix NSMenu retainCount problem

2004-02-07 Thread Richard Frith-Macdonald
On 7 Feb 2004, at 16:28, Quentin Mathé wrote: Le 7 févr. 04, à 15:47, Alexander Malmberg a écrit : Quentin Mathé wrote: 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 objec

Re: [PATCH] Fix NSMenu retainCount problem

2004-02-07 Thread Quentin Mathé
Le 7 févr. 04, à 15:47, Alexander Malmberg a écrit : Quentin Mathé wrote: 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

Re: [PATCH] Fix NSMenu retainCount problem

2004-02-07 Thread Richard Frith-Macdonald
On 7 Feb 2004, at 14:47, Alexander Malmberg wrote: Quentin Mathé wrote: 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 th

Re: [PATCH] Fix NSMenu retainCount problem

2004-02-07 Thread Alexander Malmberg
Quentin Mathé wrote: > 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. I don't think this rule should be

Re: [PATCH] Fix NSMenu retainCount problem

2004-02-07 Thread Quentin Mathé
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 ma

Re: [PATCH] Fix NSMenu retainCount problem

2004-02-06 Thread Fred Kiefer
Quentin Mathé wrote: Le 6 févr. 04, à 02:43, Quentin Mathé a écrit : Le 6 févr. 04, à 01:25, Fred Kiefer a écrit : menu = [[NSMenu alloc] initWithTitle: @"boum"]; NSLog(@"menu retain count before = %d", [menu retainCount]); { CREATE_AUTORELEASE_POOL(pool2); menuItem = [[NSMenuIt

Re: [PATCH] Fix NSMenu retainCount problem

2004-02-06 Thread Quentin Mathé
Le 6 févr. 04, à 02:43, Quentin Mathé a écrit : Le 6 févr. 04, à 01:25, Fred Kiefer a écrit : menu = [[NSMenu alloc] initWithTitle: @"boum"]; NSLog(@"menu retain count before = %d", [menu retainCount]); { CREATE_AUTORELEASE_POOL(pool2); menuItem = [[NSMenuItem alloc] init];

Re: [PATCH] Fix NSMenu retainCount problem

2004-02-05 Thread Quentin Mathé
Le 6 févr. 04, à 01:25, Fred Kiefer a écrit : menu = [[NSMenu alloc] initWithTitle: @"boum"]; NSLog(@"menu retain count before = %d", [menu retainCount]); { CREATE_AUTORELEASE_POOL(pool2); menuItem = [[NSMenuItem alloc] init]; [menu addItem: menuItem]; RELEASE(menuIt

Re: [PATCH] Fix NSMenu retainCount problem

2004-02-05 Thread Fred Kiefer
Quentin Mathé wrote: Le 5 févr. 04, à 22:37, Fred Kiefer a écrit : Quentin Mathé wrote: I did spend some time on this problem and I would like to only accept half of your patches. First I have to admit, that I was wrong with the notification center. There everythign seems to be ok. On the other

Re: [PATCH] Fix NSMenu retainCount problem

2004-02-05 Thread Quentin Mathé
Le 5 févr. 04, à 22:37, Fred Kiefer a écrit : Quentin Mathé wrote: I did spend some time on this problem and I would like to only accept half of your patches. First I have to admit, that I was wrong with the notification center. There everythign seems to be ok. On the other hand I was right tha

Re: [PATCH] Fix NSMenu retainCount problem

2004-02-05 Thread Fred Kiefer
Quentin Mathé wrote: Here is the patch, two exactly, I was talking about. NSMenu.m patch reworks the notifications use in order that the menu itself hasn't be included in a notification until the notification is sent. I'm less sure for the NSMenuView.m patch : it only removes few lines which se

[PATCH] Fix NSMenu retainCount problem

2004-02-05 Thread Quentin Mathé
Here is the patch, two exactly, I was talking about. NSMenu.m patch reworks the notifications use in order that the menu itself hasn't be included in a notification until the notification is sent. I'm less sure for the NSMenuView.m patch : it only removes few lines which seems to have no reaso