From: stephan b. <st...@s1...> - 2005-01-22 17:52:30
|
On Saturday 22 January 2005 13:00, Christian Prochnow wrote: > For this to work we have to add reference-counting to the Factories, > which implies that we also need to track object destruction, and this > is where it gets tricky. No we don't - a factory has NO relationship to the object which created it (normally, anyway). It is theoretically possible for a factory to track the objects it creates, but doing so is inflexible and non-generic. If we destroy a factory that has NO effect on the objects it creates. > I don't like the idea of having an implicit GC thread. Another way to do it is run the cleanup every X times that Factory::create() is called. > But wee also need some "plugin filesystem registry" which tells the P > plugin loader which shared objects must be loaded for a particular > class type that should be constructed. Yeah, that's a whole different matter. > We actually have two different problems: > 1. Plugin registry (only load plugin-lib's that are really needed) > 2. Factory reference counting (cleanup of unused factories) i'll give it some thought. i don't see a way to do (1) without providing some sort of file to map classes to DLLs. -- ----- st...@s1... http://s11n.net "...pleasure is a grace and is not obedient to the commands of the will." -- Alan W. Watts |