Add wxObjectDataPtr::release()
This makes it possible to use wxObjectDataPtr inside functions returning raw pointers owned by the caller, such as custom GetAttr() in the grid sample.
This commit is contained in:
@@ -296,13 +296,12 @@ class MyGridCellAttrProvider : public wxGridCellAttrProvider
|
||||
{
|
||||
public:
|
||||
MyGridCellAttrProvider();
|
||||
virtual ~MyGridCellAttrProvider();
|
||||
|
||||
virtual wxGridCellAttr *GetAttr(int row, int col,
|
||||
wxGridCellAttr::wxAttrKind kind) const wxOVERRIDE;
|
||||
|
||||
private:
|
||||
wxGridCellAttr *m_attrForOddRows;
|
||||
wxObjectDataPtr<wxGridCellAttr> m_attrForOddRows;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user