Add GlobalPtr::Release() to wxMSW private header
Add a unique_ptr<>-like function to this RAII HGLOBAL wrapper. This is not used yet, but will be in the upcoming commit.
This commit is contained in:
@@ -716,6 +716,14 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Give ownership of our handle to the caller.
|
||||||
|
HGLOBAL Release()
|
||||||
|
{
|
||||||
|
HGLOBAL h = m_hGlobal;
|
||||||
|
m_hGlobal = NULL;
|
||||||
|
return h;
|
||||||
|
}
|
||||||
|
|
||||||
// implicit conversion
|
// implicit conversion
|
||||||
operator HGLOBAL() const { return m_hGlobal; }
|
operator HGLOBAL() const { return m_hGlobal; }
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user