Add a holder class for integer arrays too

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2011-10-13 04:59:23 +00:00
parent a87c196def
commit eae4ace88a

View File

@@ -184,6 +184,19 @@ PyObject* wxPyConstructObject(void* ptr,
}
wxString* m_array;
};
// And the same for integers
class wxIntArrayHolder
{
public:
wxIntArrayHolder() : m_array(NULL) {}
~wxIntArrayHolder() {
delete [] m_array;
m_array = NULL;
}
int* m_array;
};
%End
class wxStringArrayHolder
@@ -195,4 +208,15 @@ public:
private:
wxStringArrayHolder(const wxStringArrayHolder&); // no copies
wxStringArrayHolder& operator=(wxStringArrayHolder); // no assignment
};
class wxIntArrayHolder
{
public:
wxIntArrayHolder();
~wxIntArrayHolder();
private:
wxIntArrayHolder(const wxIntArrayHolder&); // no copies
wxIntArrayHolder& operator=(wxIntArrayHolder); // no assignment
};