advertisement

Article:
  Plug It In, Plug It In
Subject:   complex Plug-Ins
Date:   2002-10-28 23:15:15
From:   stevesheets
Thanks for a great article!


However, what about complex plug-ins, which consist of multiple objects taking up a sizable amount of memory? In these cases, you do not want to invoke an object for each plug in that you might have in your various paths. This would take up to much memory! You may want to store the name of the plug ins, and only create them when the user invokes them. This is especially true in the instance where each plug in object might be invoked more than one time at same time (ex. each plug in creates a different window, and you might want two instances of the same window up on the screen).


In these cases, should you only store the name of the plug in? And when user invokes it, find the path to correct bundle? Or would this take to long, and it be better to open each Bundle, and keep the Bundle object around, ready to be invoked when needed? Or as alternative, should you invoke a small primary object at startup (as your example program does), which would only create more complex objects when the user invokes it? In that case, if you have simple object from a plug in bundle, can it safely create new objects from that bundle without any problems (ex. your filter bundle has an EditFilterSetting method which invokes a Window/WindowController and new custom view)? I was not sure you could link to other code in the bundle, after the NSBundle instance has been autoreleased.


What do you think?


Keep up the great work!


Steve Sheets


1 to 1 of 1
  1. Michael Beam photo complex Plug-Ins
    2002-11-08 11:34:18  Michael Beam | O'Reilly Author [View]

1 to 1 of 1