summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-12-21 12:54:17 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-12-21 12:54:17 (GMT)
commit0cfcbee3c536ac6d11ec806d47ce4c136f695697 (patch)
treeffe4164a1337922e66c2ed024eeb6d407ab76d59 /plugins
parentcf9ea46a796000f0252bb7d80c0ac0fb170e156a (diff)
Unloaded loaded plugins and (started to) avoid memory leaks.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@307 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'plugins')
-rw-r--r--plugins/pychrysa/pychrysa.c21
-rw-r--r--plugins/pychrysa/pychrysa.h3
2 files changed, 22 insertions, 2 deletions
diff --git a/plugins/pychrysa/pychrysa.c b/plugins/pychrysa/pychrysa.c
index d7cdfe4..0e8446d 100644
--- a/plugins/pychrysa/pychrysa.c
+++ b/plugins/pychrysa/pychrysa.c
@@ -180,8 +180,6 @@ bool init_plugin(GPluginModule *plugin, GObject *ref)
}
- //Py_Finalize();
-
return true;
}
@@ -189,6 +187,25 @@ bool init_plugin(GPluginModule *plugin, GObject *ref)
/******************************************************************************
* *
+* Paramètres : plugin = instance représentant le greffon en déchargement. *
+* *
+* Description : Libère le greffon permettant l'usage de Python. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+void exit_plugin(GPluginModule *plugin)
+{
+ Py_Finalize();
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : plugin = greffon à consulter. *
* *
* Description : Indique les opérations offertes par un greffon donné. *
diff --git a/plugins/pychrysa/pychrysa.h b/plugins/pychrysa/pychrysa.h
index daa0ccf..4145f11 100644
--- a/plugins/pychrysa/pychrysa.h
+++ b/plugins/pychrysa/pychrysa.h
@@ -40,6 +40,9 @@ char *get_plugin_name(void);
/* Initialise le greffon permettant l'usage de Python. */
bool init_plugin(GPluginModule *, GObject *);
+/* Libère le greffon permettant l'usage de Python. */
+void exit_plugin(GPluginModule *);
+
/* Indique les opérations offertes par un greffon donné. */
PluginAction get_plugin_action(const GPluginModule *);