Updates to memcheck
Corrected and beautified memory (output) Fixed a few memory leaks Fixed resizing in in wxRadioBox Added many wxFAIL and wxASSERT Corrected other wxFAIL (removed from ..::Ok()) Added wxBrush::Set..() functions Added CopyOnWrite support in GDI objects (Unshare) Disabled all occurences of WXDEBUG_NEW made clean, recompiled with mem_chcking on git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -52,7 +52,7 @@ extern wxAcceleratorTable wxNullAcceleratorTable;
|
||||
// wxAcceleratorEntry
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxAcceleratorEntry
|
||||
class wxAcceleratorEntry: public wxObject
|
||||
{
|
||||
public:
|
||||
|
||||
|
@@ -54,6 +54,15 @@ class wxBrush: public wxGDIObject
|
||||
wxColour &GetColour(void) const;
|
||||
wxBitmap *GetStipple(void) const;
|
||||
|
||||
|
||||
void SetColour( const wxColour& col );
|
||||
void SetColour( const wxString& col );
|
||||
void SetColour( unsigned char r, unsigned char g, unsigned char b );
|
||||
void SetStyle( int style );
|
||||
void SetStipple( const wxBitmap& stipple );
|
||||
|
||||
void Unshare(void);
|
||||
|
||||
// no data :-)
|
||||
};
|
||||
|
||||
|
@@ -62,6 +62,8 @@ class wxPen: public wxGDIObject
|
||||
int GetWidth(void) const;
|
||||
bool Ok(void) const;
|
||||
|
||||
void Unshare(void);
|
||||
|
||||
// no data :-)
|
||||
};
|
||||
|
||||
|
@@ -52,7 +52,7 @@ extern wxAcceleratorTable wxNullAcceleratorTable;
|
||||
// wxAcceleratorEntry
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxAcceleratorEntry
|
||||
class wxAcceleratorEntry: public wxObject
|
||||
{
|
||||
public:
|
||||
|
||||
|
@@ -54,6 +54,15 @@ class wxBrush: public wxGDIObject
|
||||
wxColour &GetColour(void) const;
|
||||
wxBitmap *GetStipple(void) const;
|
||||
|
||||
|
||||
void SetColour( const wxColour& col );
|
||||
void SetColour( const wxString& col );
|
||||
void SetColour( unsigned char r, unsigned char g, unsigned char b );
|
||||
void SetStyle( int style );
|
||||
void SetStipple( const wxBitmap& stipple );
|
||||
|
||||
void Unshare(void);
|
||||
|
||||
// no data :-)
|
||||
};
|
||||
|
||||
|
@@ -62,6 +62,8 @@ class wxPen: public wxGDIObject
|
||||
int GetWidth(void) const;
|
||||
bool Ok(void) const;
|
||||
|
||||
void Unshare(void);
|
||||
|
||||
// no data :-)
|
||||
};
|
||||
|
||||
|
@@ -40,6 +40,8 @@ class WXDLLEXPORT wxHashTable: public wxObject
|
||||
|
||||
wxHashTable(int the_key_type = wxKEY_INTEGER, int size = 1000);
|
||||
~wxHashTable(void);
|
||||
|
||||
void Destroy(void); // Robert Roebling
|
||||
|
||||
bool Create(int the_key_type = wxKEY_INTEGER, int size = 1000);
|
||||
|
||||
|
@@ -35,11 +35,12 @@
|
||||
|
||||
#include "wx/string.h"
|
||||
|
||||
#ifndef WXDEBUG_NEW
|
||||
#define WXDEBUG_NEW new(__FILE__,__LINE__)
|
||||
#endif
|
||||
|
||||
#if WXDEBUG
|
||||
|
||||
// #ifndef WXDEBUG_NEW
|
||||
// #define WXDEBUG_NEW new(__FILE__,__LINE__)
|
||||
// #endif
|
||||
|
||||
void * wxDebugAlloc(size_t size, char * fileName, int lineNum, bool isObject, bool isVect = FALSE);
|
||||
void wxDebugFree(void * buf, bool isVect = FALSE);
|
||||
|
||||
@@ -61,8 +62,6 @@ void * operator new[] (size_t size, char * fileName, int lineNum);
|
||||
void operator delete[] (void * buf);
|
||||
#endif
|
||||
|
||||
#define new WXDEBUG_NEW
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -270,7 +269,7 @@ inline void wxTraceLevel(int WXUNUSED(level), const char *WXUNUSED(fmt)) {}
|
||||
|
||||
#define WXTRACE TRUE ? (void)0 : wxTrace
|
||||
#define WXTRACELEVEL TRUE ? (void)0 : wxTraceLevel
|
||||
#define WXDEBUG_NEW new
|
||||
// #define WXDEBUG_NEW new
|
||||
|
||||
#endif // WXDEBUG
|
||||
|
||||
|
@@ -17,6 +17,7 @@
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/memory.h"
|
||||
|
||||
class WXDLLEXPORT wxObject;
|
||||
|
||||
@@ -232,10 +233,10 @@ private:
|
||||
};
|
||||
|
||||
#if WXDEBUG && USE_GLOBAL_MEMORY_OPERATORS
|
||||
#ifndef WXDEBUG_NEW
|
||||
#define WXDEBUG_NEW new(__FILE__,__LINE__)
|
||||
#endif
|
||||
#define new WXDEBUG_NEW
|
||||
//#ifndef WXDEBUG_NEW
|
||||
//#define WXDEBUG_NEW new(__FILE__,__LINE__)
|
||||
//#endif
|
||||
#define new new(__FILE__,__LINE__)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -167,9 +167,9 @@ int WXDLLEXPORT wxFindMenuItemId(wxFrame *frame, const wxString& menuString, con
|
||||
// Can't export a class derived from a non-export class
|
||||
#if !defined(_WINDLL) && !defined(WXUSINGDLL)
|
||||
|
||||
#ifdef new
|
||||
#undef new
|
||||
#endif
|
||||
// #ifdef new
|
||||
// #undef new
|
||||
// #endif
|
||||
|
||||
class WXDLLEXPORT wxDebugStreamBuf: public streambuf
|
||||
{
|
||||
@@ -182,9 +182,9 @@ class WXDLLEXPORT wxDebugStreamBuf: public streambuf
|
||||
int sync(void);
|
||||
};
|
||||
|
||||
#if WXDEBUG && USE_GLOBAL_MEMORY_OPERATORS
|
||||
#define new WXDEBUG_NEW
|
||||
#endif
|
||||
// #if WXDEBUG && USE_GLOBAL_MEMORY_OPERATORS
|
||||
// #define new WXDEBUG_NEW
|
||||
// #endif
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user