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: mot...@waves.com]



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to