git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27095
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
-static MemoryCriticalSection memLocker;
+MemoryCriticalSection &GetMemLocker()
+{
+ static MemoryCriticalSection memLocker;
+ return memLocker;
+}
+
#endif
// TODO: store whether this is a vector or not.
void * wxDebugAlloc(size_t size, wxChar * fileName, int lineNum, bool isObject, bool WXUNUSED(isVect) )
{
#if USE_THREADSAFE_MEMORY_ALLOCATION
#endif
// TODO: store whether this is a vector or not.
void * wxDebugAlloc(size_t size, wxChar * fileName, int lineNum, bool isObject, bool WXUNUSED(isVect) )
{
#if USE_THREADSAFE_MEMORY_ALLOCATION
- MemoryCriticalSectionLocker lock(memLocker);
+ MemoryCriticalSectionLocker lock(GetMemLocker());
#endif
// If not in debugging allocation mode, do the normal thing
#endif
// If not in debugging allocation mode, do the normal thing
void wxDebugFree(void * buf, bool WXUNUSED(isVect) )
{
#if USE_THREADSAFE_MEMORY_ALLOCATION
void wxDebugFree(void * buf, bool WXUNUSED(isVect) )
{
#if USE_THREADSAFE_MEMORY_ALLOCATION
- MemoryCriticalSectionLocker lock(memLocker);
+ MemoryCriticalSectionLocker lock(GetMemLocker());