Fix wxScopedCharTypeBuffer<T>::CreateOwned() to match docs.
The documentation says that it takes ownership of the memory block passed to it, but the implementation made a copy. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64209 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -95,7 +95,7 @@ public:
|
||||
// Creates "owned" buffer, i.e. takes over ownership of 'str' and frees it
|
||||
// in dtor (if ref.count reaches 0).
|
||||
static
|
||||
const wxScopedCharTypeBuffer CreateOwned(const CharType *str,
|
||||
const wxScopedCharTypeBuffer CreateOwned(CharType *str,
|
||||
size_t len = wxNO_LEN )
|
||||
{
|
||||
if ( len == wxNO_LEN )
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
|
||||
wxScopedCharTypeBuffer buf;
|
||||
if ( str )
|
||||
buf.m_data = new Data(StrCopy(str, len), len);
|
||||
buf.m_data = new Data(str, len);
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user