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:
@@ -608,6 +608,21 @@ public:
|
||||
*/
|
||||
void reset(T *ptr);
|
||||
|
||||
/**
|
||||
Release the owned pointer, making caller responsible for decrementing
|
||||
its reference count.
|
||||
|
||||
This method should be used only for interoperating with the existing
|
||||
code working with raw pointers, typically when returning a raw pointer
|
||||
from a function.
|
||||
|
||||
After calling this function, this object becomes invalid, i.e. it
|
||||
doesn't hold any valid pointer value any more.
|
||||
|
||||
@since 3.1.4
|
||||
*/
|
||||
T* release();
|
||||
|
||||
/**
|
||||
Conversion to a boolean expression (in a variant which is not
|
||||
convertable to anything but a boolean expression).
|
||||
|
Reference in New Issue
Block a user