Releasing NSCarbonWindow question.
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