Re: ARC and C++ structures
Re: ARC and C++ structures
- Subject: Re: ARC and C++ structures
- From: Matt Jacobson via Cocoa-dev <email@hidden>
- Date: Wed, 15 Sep 2021 11:39:56 -0400
> On Sep 15, 2021, at 11:21 AM, Tor Arne Vestbø <email@hidden> wrote:
>
>
>> On 14 Sep 2021, at 16:33, Matt Jacobson via Cocoa-dev
>> <email@hidden <mailto:email@hidden>> wrote:
>>
>> By default, when an NSWindow is `-close`d (which can only happen once in its
>> lifetime),
>
> Interesting. If the NSWindow is retained elsewhere, can it not be ordered in
> again? Appreciate any details you can provide :)
I was wrong about this detail. The window can definitely be ordered in again,
and any subsequent `-close` does *not* issue a `-release`, even if the window
`isReleasedWhenClosed`. (How confusing.)
So ignore the parenthetical part, but do `setReleasedWhenClosed:NO` your
windows.
Matt
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden