Re: Loading/Unloading a Cocoa-using framework from a CFM application
Re: Loading/Unloading a Cocoa-using framework from a CFM application
- Subject: Re: Loading/Unloading a Cocoa-using framework from a CFM application
- From: Dave Rehring <email@hidden>
- Date: Thu, 22 Apr 2004 12:41:36 -0700
On 4/22/04 12:01 PM, David Elliott at email@hidden wrote:
>
>
Since I am the developer of wxCocoa I decided it might be fun to try
>
using wxCocoa instead of wxMac. Surprisingly enough it works pretty
>
well. The framework loads, its entry point is called and it actually
>
shows the about box! Where I have trouble is when the framework
>
returns back to the CFM code and the CFM code unloads the bundle I get
>
the following message:
>
>
objc: cannot unmap an image containing ObjC data
>
>
I searched for that and actually found some code from Darwin online
>
(objc-runtime.m) and a cursory glance seems to indicate that some
>
things are being initialized when the library is loaded but that they
>
aren't cleaned up when it's unloaded. Is there some code I could add
>
to clean things up so the framework can unload cleanly?
>
Right now, it's my understanding that Objective-C classes cannot be
unloaded. So if you wanted to still use them as part of a plugin that gets
loaded/unloaded, you'll need to work out some way to only load your classes
a single time and never try to unload them.
Later,
--
David Rehring Psychos do not explode when light hits
VP of Research and Development them, no matter how crazy they are...
Atimi Software, Inc.
www.atimi.com And totally insane guy!
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.