Fixed resource leak for wxListItem
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -299,6 +299,15 @@ public:
|
|||||||
self->GetItem(*info);
|
self->GetItem(*info);
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
} // The OOR typemaps don't know what to do with the %new, so fix it up.
|
||||||
|
%pragma(python) addtoclass = "
|
||||||
|
def GetItem(self, *_args, **_kwargs):
|
||||||
|
val = apply(controls2c.wxListCtrl_GetItem,(self,) + _args, _kwargs)
|
||||||
|
val.thisown = 1
|
||||||
|
return val
|
||||||
|
"
|
||||||
|
|
||||||
|
%addmethods {
|
||||||
%new wxPoint* GetItemPosition(long item) {
|
%new wxPoint* GetItemPosition(long item) {
|
||||||
wxPoint* pos = new wxPoint;
|
wxPoint* pos = new wxPoint;
|
||||||
self->GetItemPosition(item, *pos);
|
self->GetItemPosition(item, *pos);
|
||||||
|
@@ -480,6 +480,12 @@ class wxListCtrlPtr(wxControlPtr):
|
|||||||
return val
|
return val
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<C wxListCtrl instance at %s>" % (self.this,)
|
return "<C wxListCtrl instance at %s>" % (self.this,)
|
||||||
|
|
||||||
|
def GetItem(self, *_args, **_kwargs):
|
||||||
|
val = apply(controls2c.wxListCtrl_GetItem,(self,) + _args, _kwargs)
|
||||||
|
val.thisown = 1
|
||||||
|
return val
|
||||||
|
|
||||||
class wxListCtrl(wxListCtrlPtr):
|
class wxListCtrl(wxListCtrlPtr):
|
||||||
def __init__(self,*_args,**_kwargs):
|
def __init__(self,*_args,**_kwargs):
|
||||||
self.this = apply(controls2c.new_wxListCtrl,_args,_kwargs)
|
self.this = apply(controls2c.new_wxListCtrl,_args,_kwargs)
|
||||||
|
Reference in New Issue
Block a user