Singleton implementation over multiple instances of one DLL (copy) ?

  • Thread starter Thread starter Lothar Behrens
  • Start date Start date
L

Lothar Behrens

Hi,

I have a class (called pluginmanager) that gets loaded indirectly by
an assembly loaded with a call to LoadFrom.
On the other hand I use operator new on other plugins, that are
directly known in my test project.

So i mix the way of creation of objects.

How do I avoid using a new instance from a 'local' DLL when the plugin
DLL is already loaded ?
(The local DLL may reside in the test application that uses this
mixture)

The plugin DLL is at a known place.

Are there any solutions ?

Thanks, Lothar
 
cant u use the singleton pattern .... private constructor ... public
GetInstance method ..... etc ......
 
Mubashir said:
cant u use the singleton pattern .... private constructor ... public
GetInstance method ..... etc ......

This didn't solve my main problem.

Dim o as MyClass = MyClass.GetInstance() usually creates an instance
form
the same physical DLL.

But there is already an instance from a copy of the DLL.

I want to reuse the yet loaded version.

Any ideas ?

Lothar
 
Back
Top