X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..569a2ae9efa226338ff67e3d509a8f1d0ae26165:/include/wx/object.h diff --git a/include/wx/object.h b/include/wx/object.h index 3ce6e27bc3..4c5ce0c4b4 100644 --- a/include/wx/object.h +++ b/include/wx/object.h @@ -115,6 +115,7 @@ WXDLLEXPORT wxObject* wxCreateStoredObject( wxInputStream& stream ); // Single inheritance with one base class #define IMPLEMENT_DYNAMIC_CLASS(name, basename) \ +wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void); \ wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \ { return new name; }\ wxClassInfo name::sm_class##name((wxChar *) wxT(#name), (wxChar *) wxT(#basename), (wxChar *) NULL, (int) sizeof(name), (wxObjectConstructorFn) wxConstructorFor##name); @@ -214,7 +215,15 @@ class WXDLLEXPORT wxObject #if defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING void * operator new (size_t size, wxChar * fileName = NULL, int lineNum = 0); + +#if defined(__VISAGECPP__) + #if __DEBUG_ALLOC__ + void operator delete (void * buf,const char * _fname, size_t _line); + #endif //__DEBUG_ALLOC__ +#else void operator delete (void * buf); +#endif + // defined(__VISAGECPP__) // VC++ 6.0 #if defined(__VISUALC__) && (__VISUALC__ >= 1200) @@ -253,6 +262,14 @@ class WXDLLEXPORT wxObject inline wxObjectRefData *GetRefData(void) const { return m_refData; } inline void SetRefData(wxObjectRefData *data) { m_refData = data; } +//EK +#if defined(__WXDEBUG__) && defined(__VISAGECPP__) +public: + static int N; + static int Nid; // total number of objects and serial counter + int id; // serial number for current object +#endif // __WXDEBUG__ + protected: wxObjectRefData* m_refData; #if wxUSE_SERIAL