Re: [Vala] How to unload, reload, or unregister a Module?
- From: Michael Brown <michael supersoftcafe com>
- To: Abderrahim Kitouni <a kitouni gmail com>
- Cc: vala-list gnome org
- Subject: Re: [Vala] How to unload, reload, or unregister a Module?
- Date: Fri, 19 Aug 2011 20:03:19 +0100
Wow, I love it already. Superb.
On 19 August 2011 18:52, Abderrahim Kitouni <a kitouni gmail com> wrote:
Hello Joseph, Michael;
في ج، 19-08-2011 عند 18:04 +0100 ، كتب Michael Brown:
Re-added the list.
You should look at the documentation for
TypeModule<
http://valadoc.org/references/gobject-2.0/0.11.5/GLib.TypeModule.html>.
Basically you subclass this, and implement the load/unload methods to use
Module <
http://valadoc.org/references/gmodule-2.0/0.11.5/GLib.Module.html>.
In the load method you construct Module, and in unload you assign null to
the member referencing it, causing an unref and deletion. That in turn
unloads the actual code.
I'm wondering if it isn't better to just use libpeas. Unless you need
something special or don't want to depend on an external library, it is
IMHO better to use something already there than reinventing the wheel.
HTH,
Abderrahim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]