[gmpi] Re: Linux C++ question
- From: Paul Davis <paul@xxxxxxxxxxxxxxxxxxxxx>
- To: gmpi@xxxxxxxxxxxxx
- Date: Thu, 24 Feb 2005 18:56:55 -0500
>You want to unload a DLL. You've called ::Release() for all Plugin
>instances (thereby destructing them). You call ::Release() for the
>Factory instance. You are then allowed to unload the DLL.
>
>Unloading the DLL without calling ::Release() on every object from that
>DLL is a logic bug. The same as you would not deref a pointer after
>free(), you don't want to do ANYTHING with a DLL after you unload it.
this brings up a general issue with all object systems. do you, or do
you not, provide a "going away" notification to interested parties.
for example, suppose you want to just unload the DLL very simply. you
could just call the DLL's unload function, which could ::Release()
every current instance of the plugins from the DLL. each ::Release()
could tell any interested parties that the plugin instance is
vanishing, and they can clean up.
the more "C" way of doing this is closer to what you propose: the host
has to track every instance, and ::Release() them. the problem is that
when there are multiple ways to cause resources to become deallocated,
assuming the use of just one those ways is a possible source of
danger.
i don't know of any clean way to do this in a C interface. the GObject
system is close, but its hardly "clean".
--p
----------------------------------------------------------------------
Generalized Music Plugin Interface (GMPI) public discussion list
Participation in this list is contingent upon your abiding by the
following rules: Please stay on topic. You are responsible for your own
words. Please respect your fellow subscribers. Please do not
redistribute anyone else's words without their permission.
Archive: http://www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe
- Follow-Ups:
- [gmpi] Re: Linux C++ question
- From: Tim Hockin
- References:
- [gmpi] Re: Linux C++ question
- From: Tim Hockin
Other related posts:
- » [gmpi] Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- » [gmpi] Re: Linux C++ question
- [gmpi] Re: Linux C++ question
- From: Tim Hockin
- [gmpi] Re: Linux C++ question
- From: Tim Hockin