• 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: C++ pointer to Cocoa object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++ pointer to Cocoa object


  • Subject: Re: C++ pointer to Cocoa object
  • From: Casey McDermott <email@hidden>
  • Date: Sat, 08 Sep 2018 14:32:14 +0000 (UTC)

>> If you are using ARC and want to get a strong
 reference on the object, you have to use __bridge_retained

That is handy to know!  I see there is also __bridge_transfer to go the other
way.

In this case we put the Cocoa controls into a NSView, which releases them.
The NSView deletes our LView, which deletes the C++ controls.

Thanks,

Casey McDermott
www.TurtleSoft.com
_______________________________________________

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: C++ pointer to Cocoa object
      • From: Alastair Houghton <email@hidden>
  • Prev by Date: Re: C++ pointer to Cocoa object
  • Next by Date: Re: How to clear macOS app bundle cache
  • Previous by thread: Re: C++ pointer to Cocoa object
  • Next by thread: Re: C++ pointer to Cocoa object
  • Index(es):
    • Date
    • Thread