X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ea57084d103187771c0306a6e1684e32244d6101..add28c55a04eb30080fc2ef9d3c5ddf66eab236a:/include/wx/object.h diff --git a/include/wx/object.h b/include/wx/object.h index 027d557aef..2791952dcb 100644 --- a/include/wx/object.h +++ b/include/wx/object.h @@ -96,10 +96,10 @@ public: static wxHashTable* sm_classTable; }; -wxObject* WXDLLEXPORT wxCreateDynamicObject(const char *name); +WXDLLEXPORT wxObject* wxCreateDynamicObject(const char *name); #ifdef wxUSE_SERIAL -wxObject* WXDLLEXPORT wxCreateStoredObject( wxInputStream& stream ); +WXDLLEXPORT wxObject* wxCreateStoredObject( wxInputStream& stream ); #endif #define DECLARE_DYNAMIC_CLASS(name) \ @@ -246,10 +246,19 @@ private: int m_count; }; -#if defined(__WXDEBUG__) && wxUSE_GLOBAL_MEMORY_OPERATORS -//#ifndef WXDEBUG_NEW -//#define WXDEBUG_NEW new(__FILE__,__LINE__) -//#endif +#ifdef __WXDEBUG__ +#ifndef WXDEBUG_NEW +#define WXDEBUG_NEW new(__FILE__,__LINE__) +#endif +#else +#define WXDEBUG_NEW new +#endif + +// Redefine new to be the debugging version. This doesn't +// work with all compilers, in which case you need to +// use WXDEBUG_NEW explicitly if you wish to use the debugging version. + +#if defined(__WXDEBUG__) && wxUSE_GLOBAL_MEMORY_OPERATORS && wxUSE_DEBUG_NEW_ALWAYS #define new new(__FILE__,__LINE__) #endif