From 5b5de2b23eb9cfbfd187592dbfd272d39e1629ad Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Tue, 27 Feb 2007 13:03:11 +0000 Subject: [PATCH] some cleanup work, and the begin of a fix for the memory leak in py_sems (Python PySemsDialog is leaking). git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@251 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- apps/py_sems/PySems.cpp | 3 ++- apps/py_sems/PySems.h | 6 +----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/apps/py_sems/PySems.cpp b/apps/py_sems/PySems.cpp index 0a13d00d..5fecb6d1 100644 --- a/apps/py_sems/PySems.cpp +++ b/apps/py_sems/PySems.cpp @@ -244,7 +244,8 @@ PySemsDialog* PySemsFactory::newDlg(const string& name) } // take the ownership over dlg - sipTransfer(dlg_inst,1); + sipTransferTo(dlg_inst,dlg_inst); + Py_DECREF(dlg_inst); dlg->setPyPtrs(NULL,dlg_inst); return dlg; diff --git a/apps/py_sems/PySems.h b/apps/py_sems/PySems.h index f58936fd..3c2d57f7 100644 --- a/apps/py_sems/PySems.h +++ b/apps/py_sems/PySems.h @@ -116,12 +116,8 @@ public: void setPyPtrs(PyObject *mod, PyObject *dlg); void onSessionStart(const AmSipRequest& req); -/* void onBye(const AmSipRequest& req); */ -/* void onDtmf(int event, int duration_msec); */ - -/* void onOtherBye(const AmSipRequest& req); */ -/* void onOtherReply(const AmSipReply& r); */ + // @see AmEventHandler void process(AmEvent* event); };