Re: question about glibmm
- From: José Alburquerque <jaalburquerque cox net>
- To: v tolstov selfip ru
- Cc: gtkmm-list gnome org
- Subject: Re: question about glibmm
- Date: Mon, 14 Jan 2008 19:06:18 -0500
Vasiliy G Tolstov wrote:
I'm wrote application what using Glib::Module for plugins.
Do i need to write special destructor for Unloading library, or
library unload automatic after program ends?
The docs say that unless you make the module resident (see
http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/classGlib_1_1Module.html#f10c2ab1a24763db0702782d4928c06f),
the module is unloaded when its destructor (Glib;:Module::~Module()) is
called. As you probably already know, a destructor is called when the
instance variable of an object goes out of scope, usually at the end of
the "block" in which they are declared (which could be the end of a
function, if block, etc.). Destructors are also called if "delete" is
called on the pointer variable to an instance which was created with the
"new" operator.
<http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/classGlib_1_1Module.html>
How can i unload library while program is running?
Either "delete" the Glib::Module, if you have a pointer to it, or simply
let it go out of scope.
-Jose
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]