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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user