So, what you suggest is that build an XPC service that starts when a format 
engine is called for, loads all plugins, scan them for formats using class 
walking, handle the method using XPC, and terminate once the format engine is 
done?

> On Dec 17, 2014, at 03:38, Uli Kusterer <witness.of.teacht...@gmx.net> wrote:
> 
> On 15 Dec 2014, at 19:19, Maxthon Chan <m...@maxchan.info> wrote:
>> My current design is that the main code is never possible of holding strong 
>> references to plugin code for extended periods. Main code keeps an eye on a 
>> folder and whenever a new bundle is dropped in it is loaded, and whenever a 
>> bundle is removed code is unloaded. Class walking is used to detect the 
>> classes loaded. Also, SKFormat does not have any instance methods, only 
>> class methods, just to prevent any autorelease pool holding onto it.
> 
> That's not enough. For instance, any constant strings in your plug-in get 
> unloaded, whether someone outside it still has a reference to that string or 
> not. I think there's a flag to avoid constant strings when building a plugin, 
> but AFAIK there are other reasons that cause similar issues.
> 
> Have you thought about making your plug-ins separate processes that 
> communicate via pipes or Mach messages or similar mechanisms?

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

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

Reply via email to