Document wxScopedCharTypeBuffer::release().

Although this method is dangerous, it still (or, maybe, especially) needs to
be documented.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2014-10-23 13:56:04 +00:00
parent e897361354
commit 4a34c928e5

View File

@ -92,6 +92,20 @@ public:
*/
~wxScopedCharTypeBuffer();
/**
Returns the internal pointer and resets the buffer.
It's the caller responsibility to deallocate the returned pointer using
@c free() function.
Notice that this method is dangerous because it can only be called on a
non-shared owning buffer. Calling it on any other kind of buffer object
will result in a crash after the pointer is freed, so avoid using it
unless absolutely necessary and you are absolutely certain that the
buffer is not shared.
*/
CharType* release() const;
/// Resets the buffer to NULL, freeing the data if necessary.
void reset();