• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ARC and C++ structures
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: ARC and C++ structures
      • From: Tor Arne Vestbø via Cocoa-dev <email@hidden>
References: 
 >ARC and C++ structures (From: Tom Doan via Cocoa-dev <email@hidden>)
 >Re: ARC and C++ structures (From: Matt Jacobson via Cocoa-dev <email@hidden>)
 >Re: ARC and C++ structures (From: Tor Arne Vestbø via Cocoa-dev <email@hidden>)

  • Prev by Date: Re: App can't be opened
  • Next by Date: Re: ARC and C++ structures
  • Previous by thread: Re: ARC and C++ structures
  • Next by thread: Re: ARC and C++ structures
  • Index(es):
    • Date
    • Thread