[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
NSPopUpButtonCell (was: Disappointed by GNUstep)
From: |
Wolfgang Lux |
Subject: |
NSPopUpButtonCell (was: Disappointed by GNUstep) |
Date: |
Tue, 8 Feb 2022 18:35:55 +0100 |
> Am 08.02.2022 um 04:16 schrieb Sergei Golovin <oozeavae@yahoo.com>:
>
> On 2022-02-08 02:49:26 +0400 Wolfgang Lux <wolfgang.lux@gmail.com> wrote:
>
>>> The attached patch changes the -[dealloc] to do the code chunk equivalent
>>> to -[setMenu:nil]
>>> avoiding that -[NSPopUpButtonCell synchronizeTitleAndSelectedItem]
>>> and following.
>> didn't have time to look at your second message earlier.
>> I like the idea of avoiding the call to setMenu: altogether. That said,
>> there is a little problem with your patch: It lets the menu leak. There
>> should be a DESTROY(_menu) or RELEASE(_menu) statement after removing
>> the observer.
>
> _menu is owned by a superclass and released there. See -[NSCell dealloc].
Doh, you are right.
I somehow convinced myself into believing that _menu was an instance variable
of NSPopUpButtonCell. :-(
Now what is confusing me is that by applying your patch we are full circle back
to before b7f5fb2, which had added the call to setMenu: to the dealloc method
in the first place. According to the log this was done in an attempt to fix a
leak of the menu. It feels like I'm missing something here.
Wolfgang
- Re: Disappointed by GNUstep, (continued)
- Re: Disappointed by GNUstep, Fred Kiefer, 2022/02/05
- Re: Disappointed by GNUstep, Wolfgang Lux, 2022/02/06
- Re: Disappointed by GNUstep, Sergei Golovin, 2022/02/07
- Re: Disappointed by GNUstep, Gregory Casamento, 2022/02/07
- Re: Disappointed by GNUstep, Wolfgang Lux, 2022/02/07
- Re: Disappointed by GNUstep, Sergei Golovin, 2022/02/07
- Re: Disappointed by GNUstep, Sergei Golovin, 2022/02/07
- NSPopUpButtonCell (was: Disappointed by GNUstep),
Wolfgang Lux <=
- Re: NSPopUpButtonCell (was: Disappointed by GNUstep), Sergei Golovin, 2022/02/08
- Automated Reference Counting (Was: Disappointed by GNUstep), Wolfgang Lux, 2022/02/07
- Re: Automated Reference Counting (Was: Disappointed by GNUstep), Fred Kiefer, 2022/02/07
- Re: Automated Reference Counting (Was: Disappointed by GNUstep), David Chisnall, 2022/02/08
- Re: Automated Reference Counting (Was: Disappointed by GNUstep), Richard Frith-Macdonald, 2022/02/08
- Re: Automated Reference Counting (Was: Disappointed by GNUstep), David Chisnall, 2022/02/08
- Re: Automated Reference Counting (Was: Disappointed by GNUstep), Richard Frith-Macdonald, 2022/02/08
- Re: Automated Reference Counting (Was: Disappointed by GNUstep), Gregory Casamento, 2022/02/08
- Re: Disappointed by GNUstep, Wolfgang Lux, 2022/02/07
Re: Disappointed by GNUstep, Gregory Casamento, 2022/02/05