• 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
Releasing NSCarbonWindow question.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Releasing NSCarbonWindow question.


  • Subject: Releasing NSCarbonWindow question.
  • From: Motti Shneor <email@hidden>
  • Date: Mon, 26 Oct 2009 05:51:59 -0400
  • Acceptlanguage: en-US
  • Thread-topic: Releasing NSCarbonWindow question.

Hello everyone.

In my Cocoa Plugin, which runs in a Carbon host application, I need to
access and manipulate a host-created Carbon window.

My Cocoa interface would be

NSWindow *cocoaWrap = [[NSWindow alloc] initWithWindowRef: hostWindow];

However, when I finish my plugin's work, and I need to release
everything and return to the host, I want and need to release the
cocoaWrap object I created. Alas, when I do [cocoWrap release]; it
closes and dismisses the original host window!!!!

This something undesirable, and illegal as far as the host plugin
interface goes.

If i neglect to release the NSCarbonWindow object (that's what it is
really isn't it?) then I crash as soon as I return to the host,
because the  plugin's memory pool is released, and it contains an
object with nonzero retain count.

How can I break this catch-22 ?




Motti Shneor
------------------------------------------
Senior Software Engineer
Waves Audio ltd.

Phone: +972-3-6094415
Mobile: +972-54-4470730
[mailto: email@hidden]



_______________________________________________

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

  • Prev by Date: MIN(), MAX()?
  • Next by Date: Re: MIN(), MAX()?
  • Previous by thread: Re: MIN(), MAX()?
  • Next by thread: Transitioning to GC-supported
  • Index(es):
    • Date
    • Thread