Fixed a bunch of embarassing reference leaks

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-06-15 05:51:11 +00:00
parent be88a6ade9
commit a66212dcdf
13 changed files with 372 additions and 288 deletions

View File

@@ -1075,11 +1075,13 @@ public:
int rval = 0;
bool found;
wxPyBeginBlockThreads();
if ((found = m_myInst.findCallback("OnCompareItems")))
rval = m_myInst.callCallback(Py_BuildValue(
"(OO)",
wxPyConstructObject((void*)&item1, "wxTreeItemId"),
wxPyConstructObject((void*)&item2, "wxTreeItemId")));
if ((found = m_myInst.findCallback("OnCompareItems"))) {
PyObject *o1 = wxPyConstructObject((void*)&item1, "wxTreeItemId");
PyObject *o2 = wxPyConstructObject((void*)&item2, "wxTreeItemId");
rval = m_myInst.callCallback(Py_BuildValue("(OO)",o1,o2));
Py_DECREF(o1);
Py_DECREF(o2);
}
wxPyEndBlockThreads();
if (! found)
rval = wxTreeCtrl::OnCompareItems(item1, item2);