Merge branch 'wine-heap-fix'

Wine heap fix and other global memory-related cleanup.

See https://github.com/wxWidgets/wxWidgets/pull/2030
This commit is contained in:
Vadim Zeitlin
2020-08-24 00:18:57 +02:00
5 changed files with 80 additions and 89 deletions

View File

@@ -773,6 +773,15 @@ public:
void *Get() const { return m_ptr; }
operator void *() const { return m_ptr; }
size_t GetSize() const
{
const size_t size = ::GlobalSize(m_hGlobal);
if ( !size )
wxLogLastError(wxT("GlobalSize"));
return size;
}
private:
HGLOBAL m_hGlobal;
void *m_ptr;