Remove memory debugging/tracing support and all related options
Drop disabled by default and pretty useless memory tracing code and all the overlapping and poorly documented build options related to it. Remove memory.cpp entirely and update all the make/project files, but preserve the now completely trivial wx/memory.h for compatibility and also keep including wx/string.h from wx/object.h as it seems like a lot of existing code actually depends on this, even if it should not. Replace the options in the propgrid sample with a couple of other debug-related options that were not used before to avoid leaving the "Debugging Section" completely empty.
This commit is contained in:
parent
bdc260bf53
commit
e89f05faba
42 changed files with 20 additions and 2412 deletions
17
Makefile.in
17
Makefile.in
|
|
@ -872,7 +872,6 @@ ALL_BASE_SOURCES = \
|
|||
src/common/list.cpp \
|
||||
src/common/log.cpp \
|
||||
src/common/longlong.cpp \
|
||||
src/common/memory.cpp \
|
||||
src/common/mimecmn.cpp \
|
||||
src/common/module.cpp \
|
||||
src/common/mstream.cpp \
|
||||
|
|
@ -1064,7 +1063,6 @@ MONODLL_OBJECTS = \
|
|||
monodll_list.o \
|
||||
monodll_log.o \
|
||||
monodll_longlong.o \
|
||||
monodll_memory.o \
|
||||
monodll_mimecmn.o \
|
||||
monodll_module.o \
|
||||
monodll_mstream.o \
|
||||
|
|
@ -1210,7 +1208,6 @@ MONOLIB_OBJECTS = \
|
|||
monolib_list.o \
|
||||
monolib_log.o \
|
||||
monolib_longlong.o \
|
||||
monolib_memory.o \
|
||||
monolib_mimecmn.o \
|
||||
monolib_module.o \
|
||||
monolib_mstream.o \
|
||||
|
|
@ -1340,7 +1337,6 @@ BASEDLL_OBJECTS = \
|
|||
basedll_list.o \
|
||||
basedll_log.o \
|
||||
basedll_longlong.o \
|
||||
basedll_memory.o \
|
||||
basedll_mimecmn.o \
|
||||
basedll_module.o \
|
||||
basedll_mstream.o \
|
||||
|
|
@ -1452,7 +1448,6 @@ BASELIB_OBJECTS = \
|
|||
baselib_list.o \
|
||||
baselib_log.o \
|
||||
baselib_longlong.o \
|
||||
baselib_memory.o \
|
||||
baselib_mimecmn.o \
|
||||
baselib_module.o \
|
||||
baselib_mstream.o \
|
||||
|
|
@ -14750,9 +14745,6 @@ monodll_log.o: $(srcdir)/src/common/log.cpp $(MONODLL_ODEP)
|
|||
monodll_longlong.o: $(srcdir)/src/common/longlong.cpp $(MONODLL_ODEP)
|
||||
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/longlong.cpp
|
||||
|
||||
monodll_memory.o: $(srcdir)/src/common/memory.cpp $(MONODLL_ODEP)
|
||||
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/memory.cpp
|
||||
|
||||
monodll_mimecmn.o: $(srcdir)/src/common/mimecmn.cpp $(MONODLL_ODEP)
|
||||
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/mimecmn.cpp
|
||||
|
||||
|
|
@ -19517,9 +19509,6 @@ monolib_log.o: $(srcdir)/src/common/log.cpp $(MONOLIB_ODEP)
|
|||
monolib_longlong.o: $(srcdir)/src/common/longlong.cpp $(MONOLIB_ODEP)
|
||||
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/longlong.cpp
|
||||
|
||||
monolib_memory.o: $(srcdir)/src/common/memory.cpp $(MONOLIB_ODEP)
|
||||
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/memory.cpp
|
||||
|
||||
monolib_mimecmn.o: $(srcdir)/src/common/mimecmn.cpp $(MONOLIB_ODEP)
|
||||
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/mimecmn.cpp
|
||||
|
||||
|
|
@ -24284,9 +24273,6 @@ basedll_log.o: $(srcdir)/src/common/log.cpp $(BASEDLL_ODEP)
|
|||
basedll_longlong.o: $(srcdir)/src/common/longlong.cpp $(BASEDLL_ODEP)
|
||||
$(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/common/longlong.cpp
|
||||
|
||||
basedll_memory.o: $(srcdir)/src/common/memory.cpp $(BASEDLL_ODEP)
|
||||
$(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/common/memory.cpp
|
||||
|
||||
basedll_mimecmn.o: $(srcdir)/src/common/mimecmn.cpp $(BASEDLL_ODEP)
|
||||
$(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/common/mimecmn.cpp
|
||||
|
||||
|
|
@ -24770,9 +24756,6 @@ baselib_log.o: $(srcdir)/src/common/log.cpp $(BASELIB_ODEP)
|
|||
baselib_longlong.o: $(srcdir)/src/common/longlong.cpp $(BASELIB_ODEP)
|
||||
$(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/common/longlong.cpp
|
||||
|
||||
baselib_memory.o: $(srcdir)/src/common/memory.cpp $(BASELIB_ODEP)
|
||||
$(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/common/memory.cpp
|
||||
|
||||
baselib_mimecmn.o: $(srcdir)/src/common/mimecmn.cpp $(BASELIB_ODEP)
|
||||
$(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/common/mimecmn.cpp
|
||||
|
||||
|
|
|
|||
|
|
@ -530,7 +530,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
|||
src/common/list.cpp
|
||||
src/common/log.cpp
|
||||
src/common/longlong.cpp
|
||||
src/common/memory.cpp
|
||||
src/common/mimecmn.cpp
|
||||
src/common/module.cpp
|
||||
src/common/mstream.cpp
|
||||
|
|
|
|||
|
|
@ -442,7 +442,6 @@ set(BASE_CMN_SRC
|
|||
src/common/list.cpp
|
||||
src/common/log.cpp
|
||||
src/common/longlong.cpp
|
||||
src/common/memory.cpp
|
||||
src/common/mimecmn.cpp
|
||||
src/common/module.cpp
|
||||
src/common/mstream.cpp
|
||||
|
|
|
|||
|
|
@ -138,16 +138,6 @@
|
|||
|
||||
|
||||
|
||||
#cmakedefine01 wxUSE_DEBUG_CONTEXT
|
||||
|
||||
#cmakedefine01 wxUSE_MEMORY_TRACING
|
||||
|
||||
#cmakedefine01 wxUSE_GLOBAL_MEMORY_OPERATORS
|
||||
|
||||
#cmakedefine01 wxUSE_DEBUG_NEW_ALWAYS
|
||||
|
||||
|
||||
|
||||
#cmakedefine01 wxUSE_EXCEPTIONS
|
||||
|
||||
#cmakedefine01 wxUSE_EXTENDED_RTTI
|
||||
|
|
|
|||
|
|
@ -461,7 +461,6 @@ BASE_CMN_SRC =
|
|||
src/common/log.cpp
|
||||
src/common/longlong.cpp
|
||||
src/common/lzmastream.cpp
|
||||
src/common/memory.cpp
|
||||
src/common/mimecmn.cpp
|
||||
src/common/module.cpp
|
||||
src/common/mstream.cpp
|
||||
|
|
|
|||
|
|
@ -443,7 +443,6 @@ MONODLL_OBJECTS = \
|
|||
$(OBJS)\monodll_list.o \
|
||||
$(OBJS)\monodll_log.o \
|
||||
$(OBJS)\monodll_longlong.o \
|
||||
$(OBJS)\monodll_memory.o \
|
||||
$(OBJS)\monodll_mimecmn.o \
|
||||
$(OBJS)\monodll_module.o \
|
||||
$(OBJS)\monodll_mstream.o \
|
||||
|
|
@ -602,7 +601,6 @@ MONOLIB_OBJECTS = \
|
|||
$(OBJS)\monolib_list.o \
|
||||
$(OBJS)\monolib_log.o \
|
||||
$(OBJS)\monolib_longlong.o \
|
||||
$(OBJS)\monolib_memory.o \
|
||||
$(OBJS)\monolib_mimecmn.o \
|
||||
$(OBJS)\monolib_module.o \
|
||||
$(OBJS)\monolib_mstream.o \
|
||||
|
|
@ -753,7 +751,6 @@ BASEDLL_OBJECTS = \
|
|||
$(OBJS)\basedll_list.o \
|
||||
$(OBJS)\basedll_log.o \
|
||||
$(OBJS)\basedll_longlong.o \
|
||||
$(OBJS)\basedll_memory.o \
|
||||
$(OBJS)\basedll_mimecmn.o \
|
||||
$(OBJS)\basedll_module.o \
|
||||
$(OBJS)\basedll_mstream.o \
|
||||
|
|
@ -885,7 +882,6 @@ BASELIB_OBJECTS = \
|
|||
$(OBJS)\baselib_list.o \
|
||||
$(OBJS)\baselib_log.o \
|
||||
$(OBJS)\baselib_longlong.o \
|
||||
$(OBJS)\baselib_memory.o \
|
||||
$(OBJS)\baselib_mimecmn.o \
|
||||
$(OBJS)\baselib_module.o \
|
||||
$(OBJS)\baselib_mstream.o \
|
||||
|
|
@ -7061,9 +7057,6 @@ $(OBJS)\monodll_log.o: ../../src/common/log.cpp
|
|||
$(OBJS)\monodll_longlong.o: ../../src/common/longlong.cpp
|
||||
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\monodll_memory.o: ../../src/common/memory.cpp
|
||||
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\monodll_mimecmn.o: ../../src/common/mimecmn.cpp
|
||||
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
|
|
@ -9651,9 +9644,6 @@ $(OBJS)\monolib_log.o: ../../src/common/log.cpp
|
|||
$(OBJS)\monolib_longlong.o: ../../src/common/longlong.cpp
|
||||
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\monolib_memory.o: ../../src/common/memory.cpp
|
||||
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\monolib_mimecmn.o: ../../src/common/mimecmn.cpp
|
||||
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
|
|
@ -12241,9 +12231,6 @@ $(OBJS)\basedll_log.o: ../../src/common/log.cpp
|
|||
$(OBJS)\basedll_longlong.o: ../../src/common/longlong.cpp
|
||||
$(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\basedll_memory.o: ../../src/common/memory.cpp
|
||||
$(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\basedll_mimecmn.o: ../../src/common/mimecmn.cpp
|
||||
$(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
|
|
@ -12589,9 +12576,6 @@ $(OBJS)\baselib_log.o: ../../src/common/log.cpp
|
|||
$(OBJS)\baselib_longlong.o: ../../src/common/longlong.cpp
|
||||
$(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\baselib_memory.o: ../../src/common/memory.cpp
|
||||
$(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\baselib_mimecmn.o: ../../src/common/mimecmn.cpp
|
||||
$(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
|
|
|
|||
|
|
@ -473,7 +473,6 @@ MONODLL_OBJECTS = \
|
|||
$(OBJS)\monodll_list.obj \
|
||||
$(OBJS)\monodll_log.obj \
|
||||
$(OBJS)\monodll_longlong.obj \
|
||||
$(OBJS)\monodll_memory.obj \
|
||||
$(OBJS)\monodll_mimecmn.obj \
|
||||
$(OBJS)\monodll_module.obj \
|
||||
$(OBJS)\monodll_mstream.obj \
|
||||
|
|
@ -639,7 +638,6 @@ MONOLIB_OBJECTS = \
|
|||
$(OBJS)\monolib_list.obj \
|
||||
$(OBJS)\monolib_log.obj \
|
||||
$(OBJS)\monolib_longlong.obj \
|
||||
$(OBJS)\monolib_memory.obj \
|
||||
$(OBJS)\monolib_mimecmn.obj \
|
||||
$(OBJS)\monolib_module.obj \
|
||||
$(OBJS)\monolib_mstream.obj \
|
||||
|
|
@ -799,7 +797,6 @@ BASEDLL_OBJECTS = \
|
|||
$(OBJS)\basedll_list.obj \
|
||||
$(OBJS)\basedll_log.obj \
|
||||
$(OBJS)\basedll_longlong.obj \
|
||||
$(OBJS)\basedll_memory.obj \
|
||||
$(OBJS)\basedll_mimecmn.obj \
|
||||
$(OBJS)\basedll_module.obj \
|
||||
$(OBJS)\basedll_mstream.obj \
|
||||
|
|
@ -941,7 +938,6 @@ BASELIB_OBJECTS = \
|
|||
$(OBJS)\baselib_list.obj \
|
||||
$(OBJS)\baselib_log.obj \
|
||||
$(OBJS)\baselib_longlong.obj \
|
||||
$(OBJS)\baselib_memory.obj \
|
||||
$(OBJS)\baselib_mimecmn.obj \
|
||||
$(OBJS)\baselib_module.obj \
|
||||
$(OBJS)\baselib_mstream.obj \
|
||||
|
|
@ -7506,9 +7502,6 @@ $(OBJS)\monodll_log.obj: ..\..\src\common\log.cpp
|
|||
$(OBJS)\monodll_longlong.obj: ..\..\src\common\longlong.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\longlong.cpp
|
||||
|
||||
$(OBJS)\monodll_memory.obj: ..\..\src\common\memory.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\memory.cpp
|
||||
|
||||
$(OBJS)\monodll_mimecmn.obj: ..\..\src\common\mimecmn.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\mimecmn.cpp
|
||||
|
||||
|
|
@ -10096,9 +10089,6 @@ $(OBJS)\monolib_log.obj: ..\..\src\common\log.cpp
|
|||
$(OBJS)\monolib_longlong.obj: ..\..\src\common\longlong.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\longlong.cpp
|
||||
|
||||
$(OBJS)\monolib_memory.obj: ..\..\src\common\memory.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\memory.cpp
|
||||
|
||||
$(OBJS)\monolib_mimecmn.obj: ..\..\src\common\mimecmn.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\mimecmn.cpp
|
||||
|
||||
|
|
@ -12686,9 +12676,6 @@ $(OBJS)\basedll_log.obj: ..\..\src\common\log.cpp
|
|||
$(OBJS)\basedll_longlong.obj: ..\..\src\common\longlong.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\longlong.cpp
|
||||
|
||||
$(OBJS)\basedll_memory.obj: ..\..\src\common\memory.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\memory.cpp
|
||||
|
||||
$(OBJS)\basedll_mimecmn.obj: ..\..\src\common\mimecmn.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\mimecmn.cpp
|
||||
|
||||
|
|
@ -13034,9 +13021,6 @@ $(OBJS)\baselib_log.obj: ..\..\src\common\log.cpp
|
|||
$(OBJS)\baselib_longlong.obj: ..\..\src\common\longlong.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\longlong.cpp
|
||||
|
||||
$(OBJS)\baselib_memory.obj: ..\..\src\common\memory.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\memory.cpp
|
||||
|
||||
$(OBJS)\baselib_mimecmn.obj: ..\..\src\common\mimecmn.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\mimecmn.cpp
|
||||
|
||||
|
|
|
|||
|
|
@ -517,7 +517,6 @@
|
|||
<ClCompile Include="..\..\src\common\list.cpp" />
|
||||
<ClCompile Include="..\..\src\common\log.cpp" />
|
||||
<ClCompile Include="..\..\src\common\longlong.cpp" />
|
||||
<ClCompile Include="..\..\src\common\memory.cpp" />
|
||||
<ClCompile Include="..\..\src\common\mimecmn.cpp" />
|
||||
<ClCompile Include="..\..\src\common\module.cpp" />
|
||||
<ClCompile Include="..\..\src\common\msgout.cpp" />
|
||||
|
|
|
|||
|
|
@ -162,9 +162,6 @@
|
|||
<ClCompile Include="..\..\src\common\lzmastream.cpp">
|
||||
<Filter>Common Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\common\memory.cpp">
|
||||
<Filter>Common Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\common\mimecmn.cpp">
|
||||
<Filter>Common Sources</Filter>
|
||||
</ClCompile>
|
||||
|
|
|
|||
|
|
@ -393,7 +393,6 @@
|
|||
F6B85CD918E93923BE631B95 /* fs_filter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AAB58DD0DEC13D68B8708085 /* fs_filter.cpp */; };
|
||||
215958201947310B88BBEDB3 /* statbmp.mm in Sources */ = {isa = PBXBuildFile; fileRef = FD6B26B5A6A733A89EF5AB9C /* statbmp.mm */; };
|
||||
D088E7DDE38C31DC9C9B3417 /* dcclient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B17772732159304AA7312D72 /* dcclient.cpp */; };
|
||||
DC978B60F6DF3176B5B114C3 /* memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5466CC2D6579360E9C665EE5 /* memory.cpp */; };
|
||||
E0E4885BF4AF34B48EB08B91 /* volume.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6506A965F677374491359FB8 /* volume.mm */; };
|
||||
8F949B9010863F66A58FFEF1 /* xh_activityindicator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60FA0E3524391D8581AD7C /* xh_activityindicator.cpp */; };
|
||||
36DB80FD5B153E9099DB6913 /* imaggif.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDB4AB7CDABA3A54B4F8207B /* imaggif.cpp */; };
|
||||
|
|
@ -1898,7 +1897,6 @@
|
|||
22C76BF2C3E331CD87657E6F /* LexNsis.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 1BC0322549563787A21CE8F1 /* LexNsis.cxx */; };
|
||||
C92005CB86C6361BBB9D7C69 /* LexBibTeX.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 0851C46057CE3C37991B9E34 /* LexBibTeX.cxx */; };
|
||||
8A4046BD38873D9CAC9C2B5A /* filesys.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F263022F3FEA3F75895B644D /* filesys.cpp */; };
|
||||
DC978B60F6DF3176B5B114C4 /* memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5466CC2D6579360E9C665EE5 /* memory.cpp */; };
|
||||
8A4046BD38873D9CAC9C2B5B /* filesys.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F263022F3FEA3F75895B644D /* filesys.cpp */; };
|
||||
1A70DDEDF9E13FF4BDA390E9 /* bmpbndl.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4B1A8E72B8E531B28C6DFD7A /* bmpbndl.mm */; };
|
||||
FE9A662A1F9B34D099C45C1E /* xh_cald.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 093B5233861B3F9B8C85762B /* xh_cald.cpp */; };
|
||||
|
|
@ -2814,7 +2812,6 @@
|
|||
552708E6296D33EBB5F6A495 /* tif_swab.c in Sources */ = {isa = PBXBuildFile; fileRef = AAC12B4456E13F57BEA25A5E /* tif_swab.c */; };
|
||||
82FA4AA043213728AC266702 /* wizard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8F08F70E1EF239999A4D2AC4 /* wizard.cpp */; };
|
||||
1EA81A0E8E5A3B38B4D80339 /* srchcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EF103B09F02315282EC8F44 /* srchcmn.cpp */; };
|
||||
DC978B60F6DF3176B5B114C5 /* memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5466CC2D6579360E9C665EE5 /* memory.cpp */; };
|
||||
BF3D600A93403C589B65C5C1 /* xh_stlin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5F555177554E398286DBC6FB /* xh_stlin.cpp */; };
|
||||
7B4DA2F5F25B3E188CBAFE3A /* hyperlnkcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8A7D521FE5B437D7AD5F4B54 /* hyperlnkcmn.cpp */; };
|
||||
9836B3D336963795928FE5A3 /* m_dflist.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 52FE1599218730CC99A3F801 /* m_dflist.cpp */; };
|
||||
|
|
@ -4381,7 +4378,6 @@
|
|||
11AE4D94B791344AB6BF6397 /* xh_bmpbt.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = xh_bmpbt.cpp; path = ../../src/xrc/xh_bmpbt.cpp; sourceTree = SOURCE_ROOT; };
|
||||
A881F49ADCF33C299B041584 /* floatpane.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = floatpane.cpp; path = ../../src/aui/floatpane.cpp; sourceTree = SOURCE_ROOT; };
|
||||
56653FACC7D13804A70556AD /* sckfile.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = sckfile.cpp; path = ../../src/common/sckfile.cpp; sourceTree = SOURCE_ROOT; };
|
||||
5466CC2D6579360E9C665EE5 /* memory.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = memory.cpp; path = ../../src/common/memory.cpp; sourceTree = SOURCE_ROOT; };
|
||||
B568A7364ECA30288820CCE7 /* mdi.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = mdi.cpp; path = ../../src/osx/carbon/mdi.cpp; sourceTree = SOURCE_ROOT; };
|
||||
48F1439BF6C3361296F05A33 /* tif_error.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = tif_error.c; path = ../../src/tiff/libtiff/tif_error.c; sourceTree = SOURCE_ROOT; };
|
||||
238741BDA2C73E56899CCB04 /* dcprint.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = dcprint.cpp; path = ../../src/osx/carbon/dcprint.cpp; sourceTree = SOURCE_ROOT; };
|
||||
|
|
@ -6349,7 +6345,6 @@
|
|||
552757A901E732CAA8E3F16D /* list.cpp */,
|
||||
EA93D41B11683E758D456531 /* log.cpp */,
|
||||
72D7AF345E563587941BD868 /* longlong.cpp */,
|
||||
5466CC2D6579360E9C665EE5 /* memory.cpp */,
|
||||
2F316F7DD3CB3390A6E50179 /* mimecmn.cpp */,
|
||||
9DB43FAB1E563B02ACEFF647 /* module.cpp */,
|
||||
DC3D1E222FD93A69B1D1366E /* mstream.cpp */,
|
||||
|
|
@ -7680,7 +7675,6 @@
|
|||
68AC8860B0943C1FAF76D96C /* list.cpp in Sources */,
|
||||
3141FEDED0943BD6A2EF858F /* log.cpp in Sources */,
|
||||
0C7E2D5C22A232368F862A61 /* longlong.cpp in Sources */,
|
||||
DC978B60F6DF3176B5B114C5 /* memory.cpp in Sources */,
|
||||
B59FC7345C383D9099391AC5 /* mimecmn.cpp in Sources */,
|
||||
EC3A1C620D323B5590AABF03 /* module.cpp in Sources */,
|
||||
F38202271C6131908C358DEC /* mstream.cpp in Sources */,
|
||||
|
|
@ -8403,7 +8397,6 @@
|
|||
68AC8860B0943C1FAF76D96B /* list.cpp in Sources */,
|
||||
3141FEDED0943BD6A2EF8591 /* log.cpp in Sources */,
|
||||
0C7E2D5C22A232368F862A60 /* longlong.cpp in Sources */,
|
||||
DC978B60F6DF3176B5B114C3 /* memory.cpp in Sources */,
|
||||
B59FC7345C383D9099391AC4 /* mimecmn.cpp in Sources */,
|
||||
EC3A1C620D323B5590AABF02 /* module.cpp in Sources */,
|
||||
F38202271C6131908C358DEE /* mstream.cpp in Sources */,
|
||||
|
|
@ -9726,7 +9719,6 @@
|
|||
68AC8860B0943C1FAF76D96D /* list.cpp in Sources */,
|
||||
3141FEDED0943BD6A2EF8590 /* log.cpp in Sources */,
|
||||
0C7E2D5C22A232368F862A62 /* longlong.cpp in Sources */,
|
||||
DC978B60F6DF3176B5B114C4 /* memory.cpp in Sources */,
|
||||
B59FC7345C383D9099391AC3 /* mimecmn.cpp in Sources */,
|
||||
EC3A1C620D323B5590AABF04 /* module.cpp in Sources */,
|
||||
F38202271C6131908C358DED /* mstream.cpp in Sources */,
|
||||
|
|
|
|||
|
|
@ -145,7 +145,6 @@
|
|||
522E6CF2A62F34259BCE2DE2 /* tif_flush.c in Sources */ = {isa = PBXBuildFile; fileRef = 305614D19CF23CB2B14A5B2E /* tif_flush.c */; };
|
||||
F016C51053373E658ED4C9A9 /* helpext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF376BC55EA73F5FB7328142 /* helpext.cpp */; };
|
||||
D7F14BDFFB7F369B842AFC13 /* pcre2_config.c in Sources */ = {isa = PBXBuildFile; fileRef = FC6A8FAE9CA63EEB8883B6BD /* pcre2_config.c */; };
|
||||
DC978B60F6DF3176B5B114C3 /* memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5466CC2D6579360E9C665EE5 /* memory.cpp */; };
|
||||
BD49EC50CB363642BDBF25C8 /* mousemanager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D037EA567C253DEEA17E822B /* mousemanager.cpp */; };
|
||||
20F10669703137E68318C6FD /* cmndata.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0510EE0FB3FF36EF8670ABD1 /* cmndata.cpp */; };
|
||||
427E6AF88CF73D799206E37D /* checkboxcmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FC2F076657431458896115A /* checkboxcmn.cpp */; };
|
||||
|
|
@ -1569,7 +1568,6 @@
|
|||
D7B3307E56B332769901E99F /* filehistorycmn.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = filehistorycmn.cpp; path = ../../src/common/filehistorycmn.cpp; sourceTree = SOURCE_ROOT; };
|
||||
21A697F65B1E31168F0A7BD7 /* xh_tree.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = xh_tree.cpp; path = ../../src/xrc/xh_tree.cpp; sourceTree = SOURCE_ROOT; };
|
||||
5BD6231188AB329CAA5E1171 /* evtloop_cf.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = evtloop_cf.cpp; path = ../../src/osx/core/evtloop_cf.cpp; sourceTree = SOURCE_ROOT; };
|
||||
5466CC2D6579360E9C665EE5 /* memory.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = memory.cpp; path = ../../src/common/memory.cpp; sourceTree = SOURCE_ROOT; };
|
||||
994AF74DF2A13FF09A215853 /* intel_init.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = intel_init.c; path = ../../src/png/intel/intel_init.c; sourceTree = SOURCE_ROOT; };
|
||||
7395814D42CC38F6B8CD81B4 /* gzlib.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = gzlib.c; path = ../../src/zlib/gzlib.c; sourceTree = SOURCE_ROOT; };
|
||||
9DB43FAB1E563B02ACEFF647 /* module.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = module.cpp; path = ../../src/common/module.cpp; sourceTree = SOURCE_ROOT; };
|
||||
|
|
@ -2139,7 +2137,6 @@
|
|||
552757A901E732CAA8E3F16D /* list.cpp */,
|
||||
EA93D41B11683E758D456531 /* log.cpp */,
|
||||
72D7AF345E563587941BD868 /* longlong.cpp */,
|
||||
5466CC2D6579360E9C665EE5 /* memory.cpp */,
|
||||
2F316F7DD3CB3390A6E50179 /* mimecmn.cpp */,
|
||||
9DB43FAB1E563B02ACEFF647 /* module.cpp */,
|
||||
DC3D1E222FD93A69B1D1366E /* mstream.cpp */,
|
||||
|
|
@ -3075,7 +3072,6 @@
|
|||
68AC8860B0943C1FAF76D96B /* list.cpp in Sources */,
|
||||
3141FEDED0943BD6A2EF858F /* log.cpp in Sources */,
|
||||
0C7E2D5C22A232368F862A60 /* longlong.cpp in Sources */,
|
||||
DC978B60F6DF3176B5B114C3 /* memory.cpp in Sources */,
|
||||
B59FC7345C383D9099391AC3 /* mimecmn.cpp in Sources */,
|
||||
EC3A1C620D323B5590AABF02 /* module.cpp in Sources */,
|
||||
F38202271C6131908C358DEC /* mstream.cpp in Sources */,
|
||||
|
|
|
|||
77
configure
vendored
77
configure
vendored
|
|
@ -673,7 +673,6 @@ COND_wxUSE_EXPAT_builtin
|
|||
COND_WXUNIV_1
|
||||
COND_WITH_PLUGIN_SDL_1
|
||||
COND_WINDOWS_IMPLIB_1
|
||||
COND_USE_XRC_1
|
||||
COND_USE_XML_1
|
||||
COND_USE_WEBVIEW_WEBKIT2_1
|
||||
COND_USE_THREADS_1
|
||||
|
|
@ -1115,8 +1114,6 @@ enable_debug
|
|||
enable_debug_flag
|
||||
enable_debug_info
|
||||
enable_debug_gdb
|
||||
enable_debug_cntxt
|
||||
enable_mem_tracing
|
||||
enable_shared
|
||||
enable_cxx11
|
||||
with_cxx
|
||||
|
|
@ -2082,8 +2079,6 @@ Optional Features:
|
|||
--disable-debug_flag disable all debugging support
|
||||
--enable-debug_info generate debug information
|
||||
--enable-debug_gdb create code with extra GDB debugging information
|
||||
--enable-debug_cntxt obsolete, don't use: use wxDebugContext
|
||||
--enable-mem_tracing obsolete, don't use: create code with memory tracing
|
||||
--disable-shared create static library instead of shared
|
||||
--enable-cxx11 obsolete option doing nothing
|
||||
--enable-stl use standard C++ classes for everything
|
||||
|
|
@ -5523,64 +5518,6 @@ fi
|
|||
eval "$wx_cv_use_debug_gdb"
|
||||
|
||||
|
||||
enablestring=
|
||||
defaultval=
|
||||
if test -z "$defaultval"; then
|
||||
if test x"$enablestring" = xdisable; then
|
||||
defaultval=yes
|
||||
else
|
||||
defaultval=no
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check whether --enable-debug_cntxt was given.
|
||||
if test "${enable_debug_cntxt+set}" = set; then :
|
||||
enableval=$enable_debug_cntxt;
|
||||
if test "$enableval" = yes; then
|
||||
wx_cv_use_debug_cntxt='wxUSE_DEBUG_CONTEXT=yes'
|
||||
else
|
||||
wx_cv_use_debug_cntxt='wxUSE_DEBUG_CONTEXT=no'
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
wx_cv_use_debug_cntxt='wxUSE_DEBUG_CONTEXT=${'DEFAULT_wxUSE_DEBUG_CONTEXT":-$defaultval}"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
eval "$wx_cv_use_debug_cntxt"
|
||||
|
||||
|
||||
enablestring=
|
||||
defaultval=
|
||||
if test -z "$defaultval"; then
|
||||
if test x"$enablestring" = xdisable; then
|
||||
defaultval=yes
|
||||
else
|
||||
defaultval=no
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check whether --enable-mem_tracing was given.
|
||||
if test "${enable_mem_tracing+set}" = set; then :
|
||||
enableval=$enable_mem_tracing;
|
||||
if test "$enableval" = yes; then
|
||||
wx_cv_use_mem_tracing='wxUSE_MEM_TRACING=yes'
|
||||
else
|
||||
wx_cv_use_mem_tracing='wxUSE_MEM_TRACING=no'
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
wx_cv_use_mem_tracing='wxUSE_MEM_TRACING=${'DEFAULT_wxUSE_MEM_TRACING":-$defaultval}"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
eval "$wx_cv_use_mem_tracing"
|
||||
|
||||
|
||||
|
||||
|
||||
enablestring=disable
|
||||
|
|
@ -35635,15 +35572,6 @@ if test "$wxUSE_DEBUG_FLAG" = "no" ; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if test "$wxUSE_MEM_TRACING" = "yes" ; then
|
||||
$as_echo "#define wxUSE_MEMORY_TRACING 1" >>confdefs.h
|
||||
|
||||
$as_echo "#define wxUSE_GLOBAL_MEMORY_OPERATORS 1" >>confdefs.h
|
||||
|
||||
$as_echo "#define wxUSE_DEBUG_NEW_ALWAYS 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
if test "$wxUSE_DMALLOC" = "yes" ; then
|
||||
DMALLOC_LIBS="-ldmallocthcxx"
|
||||
fi
|
||||
|
|
@ -43251,11 +43179,6 @@ EOF
|
|||
COND_USE_XML_1=""
|
||||
fi
|
||||
|
||||
COND_USE_XRC_1="#"
|
||||
if test "x$USE_XRC" = "x1" ; then
|
||||
COND_USE_XRC_1=""
|
||||
fi
|
||||
|
||||
COND_WINDOWS_IMPLIB_1="#"
|
||||
if test "x$WINDOWS_IMPLIB" = "x1" ; then
|
||||
COND_WINDOWS_IMPLIB_1=""
|
||||
|
|
|
|||
|
|
@ -647,8 +647,6 @@ dnl
|
|||
dnl in any case, only set the default value and allow overriding it with an
|
||||
|
||||
WX_ARG_ENABLE(debug_gdb, [ --enable-debug_gdb create code with extra GDB debugging information], wxUSE_DEBUG_GDB)
|
||||
WX_ARG_ENABLE(debug_cntxt, [ --enable-debug_cntxt obsolete, don't use: use wxDebugContext], wxUSE_DEBUG_CONTEXT)
|
||||
WX_ARG_ENABLE(mem_tracing, [ --enable-mem_tracing obsolete, don't use: create code with memory tracing], wxUSE_MEM_TRACING)
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl global compile options
|
||||
|
|
@ -4797,12 +4795,6 @@ if test "$wxUSE_DEBUG_FLAG" = "no" ; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if test "$wxUSE_MEM_TRACING" = "yes" ; then
|
||||
AC_DEFINE(wxUSE_MEMORY_TRACING)
|
||||
AC_DEFINE(wxUSE_GLOBAL_MEMORY_OPERATORS)
|
||||
AC_DEFINE(wxUSE_DEBUG_NEW_ALWAYS)
|
||||
fi
|
||||
|
||||
if test "$wxUSE_DMALLOC" = "yes" ; then
|
||||
DMALLOC_LIBS="-ldmallocthcxx"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -86,6 +86,11 @@ Changes in behaviour which may result in build errors
|
|||
the official ones and those using MSVS projects, but also when using
|
||||
makefile.vc or CMake, for consistency.
|
||||
|
||||
- Support for memory debugging that was previously disabled but could be
|
||||
activated by using wxUSE_MEMORY_TRACING, wxUSE_GLOBAL_MEMORY_OPERATORS etc
|
||||
options was completely removed. Please use address sanitizer or similar
|
||||
tools that are incomparably more useful for this than that legacy code.
|
||||
|
||||
|
||||
3.3.0: (released 2022-??-??)
|
||||
----------------------------
|
||||
|
|
|
|||
|
|
@ -91,8 +91,6 @@ library:
|
|||
@itemdef{wxUSE_DATETIME, Use wxDateTime and related classes.}
|
||||
@itemdef{wxUSE_DBGHELP, Predefine as 0 to avoid using wxDbgHelpDLL and related classes.}
|
||||
@itemdef{wxUSE_DC_TRANSFORM_MATRIX, Use wxDC::SetTransformMatrix() and related methods.}
|
||||
@itemdef{wxUSE_DEBUG_CONTEXT, Use wxDebugContext class.}
|
||||
@itemdef{wxUSE_DEBUG_NEW_ALWAYS, See @ref overview_debugging}
|
||||
@itemdef{wxUSE_DEBUGREPORT, Use wxDebugReport class.}
|
||||
@itemdef{wxUSE_DIALUP_MANAGER, Use wxDialUpManager and related classes.}
|
||||
@itemdef{wxUSE_DIRDLG, Use wxDirDialog class.}
|
||||
|
|
@ -130,7 +128,6 @@ library:
|
|||
@itemdef{wxUSE_GEOMETRY, Use common geometry classes}
|
||||
@itemdef{wxUSE_GIF, Use GIF wxImageHandler}
|
||||
@itemdef{wxUSE_GLCANVAS, Enables OpenGL support.}
|
||||
@itemdef{wxUSE_GLOBAL_MEMORY_OPERATORS, Override global operators @c new and @c delete to use wxWidgets memory leak detection}
|
||||
@itemdef{wxUSE_GRAPHICS_CONTEXT, Use wxGraphicsContext and related classes.}
|
||||
@itemdef{wxUSE_GRID, Use wxGrid and related classes.}
|
||||
@itemdef{wxUSE_HELP, Use wxHelpController and related classes.}
|
||||
|
|
@ -163,7 +160,6 @@ library:
|
|||
@itemdef{wxUSE_MDI, Use wxMDIParentFrame, and wxMDIChildFrame}
|
||||
@itemdef{wxUSE_MDI_ARCHITECTURE, Use MDI-based document-view classes.}
|
||||
@itemdef{wxUSE_MEDIACTRL, Use wxMediaCtrl.}
|
||||
@itemdef{wxUSE_MEMORY_TRACING, Use wxWidgets memory leak detection, not recommended if using another memory debugging tool.}
|
||||
@itemdef{wxUSE_MENUS, Use wxMenu and wxMenuItem.}
|
||||
@itemdef{wxUSE_MENUBAR, Use wxMenubar.}
|
||||
@itemdef{wxUSE_METAFILE, Use wxMetaFile and related classes.}
|
||||
|
|
|
|||
|
|
@ -427,10 +427,6 @@ Troubleshooting {#x11_troubleshooting}
|
|||
argument functions, try putting the gcc fixinclude file paths early in the
|
||||
include path.
|
||||
|
||||
- If you operator-related compile errors or strange memory problems
|
||||
(for example in deletion of string arrays), set wxUSE_GLOBAL_MEMORY_OPERATORS
|
||||
and wxUSE_MEMORY_TRACING to 0 in setup.h, and recompile.
|
||||
|
||||
- If you get an internal compiler error in gcc, turn off optimisations.
|
||||
|
||||
- Some compilers, such as Sun C++, may give a lot of warnings about
|
||||
|
|
|
|||
|
|
@ -125,60 +125,6 @@
|
|||
// is no overhead if you don't use it
|
||||
#define wxUSE_DEBUGREPORT 1
|
||||
|
||||
// Generic comment about debugging settings: they are very useful if you don't
|
||||
// use any other memory leak detection tools such as Purify/BoundsChecker, but
|
||||
// are probably redundant otherwise. Also, Visual C++ CRT has the same features
|
||||
// as wxWidgets memory debugging subsystem built in since version 5.0 and you
|
||||
// may prefer to use it instead of built in memory debugging code because it is
|
||||
// faster and more fool proof.
|
||||
//
|
||||
// Using VC++ CRT memory debugging is enabled by default in debug build (_DEBUG
|
||||
// is defined) if wxUSE_GLOBAL_MEMORY_OPERATORS is *not* enabled (i.e. is 0)
|
||||
// and if __NO_VC_CRTDBG__ is not defined.
|
||||
|
||||
// The rest of the options in this section are obsolete and not supported,
|
||||
// enable them at your own risk.
|
||||
|
||||
// If 1, enables wxDebugContext, for writing error messages to file, etc. If
|
||||
// __WXDEBUG__ is not defined, will still use the normal memory operators.
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 0
|
||||
#define wxUSE_DEBUG_CONTEXT 0
|
||||
|
||||
// If 1, enables debugging versions of wxObject::new and wxObject::delete *IF*
|
||||
// __WXDEBUG__ is also defined.
|
||||
//
|
||||
// WARNING: this code may not work with all architectures, especially if
|
||||
// alignment is an issue. This switch is currently ignored for mingw / cygwin
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 1 if you are not using a memory debugging tool, else 0
|
||||
#define wxUSE_MEMORY_TRACING 0
|
||||
|
||||
// In debug mode, cause new and delete to be redefined globally.
|
||||
// If this causes problems (e.g. link errors which is a common problem
|
||||
// especially if you use another library which also redefines the global new
|
||||
// and delete), set this to 0.
|
||||
// This switch is currently ignored for mingw / cygwin
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 0
|
||||
#define wxUSE_GLOBAL_MEMORY_OPERATORS 0
|
||||
|
||||
// In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If
|
||||
// this causes problems (e.g. link errors), set this to 0. You may need to set
|
||||
// this to 0 if using templates (at least for VC++). This switch is currently
|
||||
// ignored for MinGW/Cygwin.
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 0
|
||||
#define wxUSE_DEBUG_NEW_ALWAYS 0
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// global features
|
||||
|
|
|
|||
|
|
@ -850,13 +850,6 @@ typedef short int WXTYPE;
|
|||
/* compiler specific settings */
|
||||
/* ---------------------------------------------------------------------------- */
|
||||
|
||||
/* where should i put this? we need to make sure of this as it breaks */
|
||||
/* the <iostream> code. */
|
||||
#if defined(__WXDEBUG__)
|
||||
# undef wxUSE_DEBUG_NEW_ALWAYS
|
||||
# define wxUSE_DEBUG_NEW_ALWAYS 0
|
||||
#endif
|
||||
|
||||
#include "wx/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
|
|
@ -3583,12 +3583,6 @@ public:
|
|||
// Clear table
|
||||
void Clear();
|
||||
|
||||
#if wxUSE_MEMORY_TRACING
|
||||
// Clear all tables: only used to work around problems in memory tracing
|
||||
// code
|
||||
static void ClearAll();
|
||||
#endif // wxUSE_MEMORY_TRACING
|
||||
|
||||
protected:
|
||||
// Init the hash table with the entries of the static event table.
|
||||
void InitHashTable();
|
||||
|
|
|
|||
|
|
@ -126,60 +126,6 @@
|
|||
// is no overhead if you don't use it
|
||||
#define wxUSE_DEBUGREPORT 1
|
||||
|
||||
// Generic comment about debugging settings: they are very useful if you don't
|
||||
// use any other memory leak detection tools such as Purify/BoundsChecker, but
|
||||
// are probably redundant otherwise. Also, Visual C++ CRT has the same features
|
||||
// as wxWidgets memory debugging subsystem built in since version 5.0 and you
|
||||
// may prefer to use it instead of built in memory debugging code because it is
|
||||
// faster and more fool proof.
|
||||
//
|
||||
// Using VC++ CRT memory debugging is enabled by default in debug build (_DEBUG
|
||||
// is defined) if wxUSE_GLOBAL_MEMORY_OPERATORS is *not* enabled (i.e. is 0)
|
||||
// and if __NO_VC_CRTDBG__ is not defined.
|
||||
|
||||
// The rest of the options in this section are obsolete and not supported,
|
||||
// enable them at your own risk.
|
||||
|
||||
// If 1, enables wxDebugContext, for writing error messages to file, etc. If
|
||||
// __WXDEBUG__ is not defined, will still use the normal memory operators.
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 0
|
||||
#define wxUSE_DEBUG_CONTEXT 0
|
||||
|
||||
// If 1, enables debugging versions of wxObject::new and wxObject::delete *IF*
|
||||
// __WXDEBUG__ is also defined.
|
||||
//
|
||||
// WARNING: this code may not work with all architectures, especially if
|
||||
// alignment is an issue. This switch is currently ignored for mingw / cygwin
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 1 if you are not using a memory debugging tool, else 0
|
||||
#define wxUSE_MEMORY_TRACING 0
|
||||
|
||||
// In debug mode, cause new and delete to be redefined globally.
|
||||
// If this causes problems (e.g. link errors which is a common problem
|
||||
// especially if you use another library which also redefines the global new
|
||||
// and delete), set this to 0.
|
||||
// This switch is currently ignored for mingw / cygwin
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 0
|
||||
#define wxUSE_GLOBAL_MEMORY_OPERATORS 0
|
||||
|
||||
// In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If
|
||||
// this causes problems (e.g. link errors), set this to 0. You may need to set
|
||||
// this to 0 if using templates (at least for VC++). This switch is currently
|
||||
// ignored for MinGW/Cygwin.
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 0
|
||||
#define wxUSE_DEBUG_NEW_ALWAYS 0
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// global features
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/memory.h
|
||||
// Purpose: Memory operations
|
||||
// Purpose: Obsolete legacy header for memory debugging: don't include it
|
||||
// it any longer, it is only preserved to avoid breaking existing
|
||||
// code including it.
|
||||
// Author: Arthur Seaton, Julian Smart
|
||||
// Modified by:
|
||||
// Created: 29/01/98
|
||||
|
|
@ -11,339 +13,8 @@
|
|||
#ifndef _WX_MEMORY_H_
|
||||
#define _WX_MEMORY_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/msgout.h"
|
||||
|
||||
#if wxUSE_MEMORY_TRACING || wxUSE_DEBUG_CONTEXT
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
WXDLLIMPEXP_BASE void * wxDebugAlloc(size_t size, wxChar * fileName, int lineNum, bool isObject, bool isVect = false);
|
||||
WXDLLIMPEXP_BASE void wxDebugFree(void * buf, bool isVect = false);
|
||||
|
||||
//**********************************************************************************
|
||||
/*
|
||||
The global operator new used for everything apart from getting
|
||||
dynamic storage within this function itself.
|
||||
*/
|
||||
|
||||
// We'll only do malloc and free for the moment: leave the interesting
|
||||
// stuff for the wxObject versions.
|
||||
|
||||
|
||||
#if wxUSE_GLOBAL_MEMORY_OPERATORS
|
||||
|
||||
// Undefine temporarily (new is #defined in object.h) because we want to
|
||||
// declare some new operators.
|
||||
#ifdef new
|
||||
#undef new
|
||||
#endif
|
||||
|
||||
#if defined(__SUNCC__)
|
||||
#define wxUSE_ARRAY_MEMORY_OPERATORS 0
|
||||
#elif defined (__SGI_CC_)
|
||||
// only supported by -n32 compilers
|
||||
#ifndef __EDG_ABI_COMPATIBILITY_VERSION
|
||||
#define wxUSE_ARRAY_MEMORY_OPERATORS 0
|
||||
#endif
|
||||
#else
|
||||
#define wxUSE_ARRAY_MEMORY_OPERATORS 1
|
||||
#endif
|
||||
|
||||
// devik 2000-8-29: All new/delete ops are now inline because they can't
|
||||
// be marked as dllexport/dllimport. It then leads to weird bugs when
|
||||
// used on MSW as DLL
|
||||
#if defined(__WINDOWS__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE))
|
||||
inline void * operator new (size_t size, wxChar * fileName, int lineNum)
|
||||
{
|
||||
return wxDebugAlloc(size, fileName, lineNum, false, false);
|
||||
}
|
||||
|
||||
inline void * operator new (size_t size)
|
||||
{
|
||||
return wxDebugAlloc(size, nullptr, 0, false);
|
||||
}
|
||||
|
||||
inline void operator delete (void * buf)
|
||||
{
|
||||
wxDebugFree(buf, false);
|
||||
}
|
||||
|
||||
#if wxUSE_ARRAY_MEMORY_OPERATORS
|
||||
inline void * operator new[] (size_t size)
|
||||
{
|
||||
return wxDebugAlloc(size, nullptr, 0, false, true);
|
||||
}
|
||||
|
||||
inline void * operator new[] (size_t size, wxChar * fileName, int lineNum)
|
||||
{
|
||||
return wxDebugAlloc(size, fileName, lineNum, false, true);
|
||||
}
|
||||
|
||||
inline void operator delete[] (void * buf)
|
||||
{
|
||||
wxDebugFree(buf, true);
|
||||
}
|
||||
#endif // wxUSE_ARRAY_MEMORY_OPERATORS
|
||||
|
||||
#else
|
||||
|
||||
void * operator new (size_t size, wxChar * fileName, int lineNum);
|
||||
|
||||
void * operator new (size_t size);
|
||||
|
||||
void operator delete (void * buf);
|
||||
|
||||
#if wxUSE_ARRAY_MEMORY_OPERATORS
|
||||
void * operator new[] (size_t size);
|
||||
|
||||
void * operator new[] (size_t size, wxChar * fileName, int lineNum);
|
||||
|
||||
void operator delete[] (void * buf);
|
||||
#endif // wxUSE_ARRAY_MEMORY_OPERATORS
|
||||
#endif // defined(__WINDOWS__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE))
|
||||
|
||||
#if defined(__VISUALC__)
|
||||
inline void operator delete(void* pData, wxChar* /* fileName */, int /* lineNum */)
|
||||
{
|
||||
wxDebugFree(pData, false);
|
||||
}
|
||||
inline void operator delete[](void* pData, wxChar* /* fileName */, int /* lineNum */)
|
||||
{
|
||||
wxDebugFree(pData, true);
|
||||
}
|
||||
#endif // __VISUALC__
|
||||
#endif // wxUSE_GLOBAL_MEMORY_OPERATORS
|
||||
|
||||
//**********************************************************************************
|
||||
|
||||
typedef unsigned int wxMarkerType;
|
||||
|
||||
/*
|
||||
Define the struct which will be placed at the start of all dynamically
|
||||
allocated memory.
|
||||
*/
|
||||
|
||||
class WXDLLIMPEXP_BASE wxMemStruct {
|
||||
|
||||
friend class WXDLLIMPEXP_FWD_BASE wxDebugContext; // access to the m_next pointer for list traversal.
|
||||
|
||||
public:
|
||||
public:
|
||||
int AssertList ();
|
||||
|
||||
size_t RequestSize () { return m_reqSize; }
|
||||
wxMarkerType Marker () { return m_firstMarker; }
|
||||
|
||||
// When an object is deleted we set the id slot to a specific value.
|
||||
inline void SetDeleted ();
|
||||
inline int IsDeleted ();
|
||||
|
||||
int Append ();
|
||||
int Unlink ();
|
||||
|
||||
// Used to determine if the object is really a wxMemStruct.
|
||||
// Not a foolproof test by any means, but better than none I hope!
|
||||
int AssertIt ();
|
||||
|
||||
// Do all validation on a node.
|
||||
int ValidateNode ();
|
||||
|
||||
// Check the integrity of a node and of the list, node by node.
|
||||
int CheckBlock ();
|
||||
int CheckAllPrevious ();
|
||||
|
||||
// Print a single node.
|
||||
void PrintNode ();
|
||||
|
||||
// Called when the memory linking functions get an error.
|
||||
void ErrorMsg (const char *);
|
||||
void ErrorMsg ();
|
||||
|
||||
inline void *GetActualData(void) const { return m_actualData; }
|
||||
|
||||
void Dump(void);
|
||||
|
||||
public:
|
||||
// Check for underwriting. There are 2 of these checks. This one
|
||||
// inside the struct and another right after the struct.
|
||||
wxMarkerType m_firstMarker;
|
||||
|
||||
// File name and line number are from cpp.
|
||||
wxChar* m_fileName;
|
||||
int m_lineNum;
|
||||
|
||||
// The amount of memory requested by the caller.
|
||||
size_t m_reqSize;
|
||||
|
||||
// Used to try to verify that we really are dealing with an object
|
||||
// of the required class. Can be 1 of 2 values these indicating a valid
|
||||
// wxMemStruct object, or a deleted wxMemStruct object.
|
||||
wxMarkerType m_id;
|
||||
|
||||
wxMemStruct * m_prev;
|
||||
wxMemStruct * m_next;
|
||||
|
||||
void * m_actualData;
|
||||
bool m_isObject;
|
||||
};
|
||||
|
||||
|
||||
typedef void (wxMemStruct::*PmSFV) ();
|
||||
|
||||
// Type of the app function that can be installed and called at wxWidgets shutdown
|
||||
// (after all other registered files with global destructors have been closed down).
|
||||
typedef void (*wxShutdownNotifyFunction)();
|
||||
|
||||
/*
|
||||
Debugging class. This will only have a single instance, but it's
|
||||
a reasonable way to keep everything together and to make this
|
||||
available for change if needed by someone else.
|
||||
A lot of this stuff would be better off within the wxMemStruct class, but
|
||||
it's stuff which we need to access at times when there is no wxMemStruct
|
||||
object so we use this class instead. Think of it as a collection of
|
||||
globals which have to do with the wxMemStruct class.
|
||||
*/
|
||||
|
||||
class WXDLLIMPEXP_BASE wxDebugContext {
|
||||
|
||||
protected:
|
||||
// Used to set alignment for markers.
|
||||
static size_t CalcAlignment ();
|
||||
|
||||
// Returns the amount of padding needed after something of the given
|
||||
// size. This is so that when we cast pointers backwards and forwards
|
||||
// the pointer value will be valid for a wxMarkerType.
|
||||
static size_t GetPadding (size_t size) ;
|
||||
|
||||
// Traverse the list.
|
||||
static void TraverseList (PmSFV, wxMemStruct *from = nullptr);
|
||||
|
||||
static int debugLevel;
|
||||
static bool debugOn;
|
||||
|
||||
static int m_balign; // byte alignment
|
||||
static int m_balignmask; // mask for performing byte alignment
|
||||
public:
|
||||
// Set a checkpoint to dump only the memory from
|
||||
// a given point
|
||||
static wxMemStruct *checkPoint;
|
||||
|
||||
wxDebugContext(void);
|
||||
~wxDebugContext(void);
|
||||
|
||||
static int GetLevel(void) { return debugLevel; }
|
||||
static void SetLevel(int level) { debugLevel = level; }
|
||||
|
||||
static bool GetDebugMode(void) { return debugOn; }
|
||||
static void SetDebugMode(bool flag) { debugOn = flag; }
|
||||
|
||||
static void SetCheckpoint(bool all = false);
|
||||
static wxMemStruct *GetCheckpoint(void) { return checkPoint; }
|
||||
|
||||
// Calculated from the request size and any padding needed
|
||||
// before the final marker.
|
||||
static size_t PaddedSize (size_t reqSize);
|
||||
|
||||
// Calc the total amount of space we need from the system
|
||||
// to satisfy a caller request. This includes all padding.
|
||||
static size_t TotSize (size_t reqSize);
|
||||
|
||||
// Return valid pointers to offsets within the allocated memory.
|
||||
static char * StructPos (const char * buf);
|
||||
static char * MidMarkerPos (const char * buf);
|
||||
static char * CallerMemPos (const char * buf);
|
||||
static char * EndMarkerPos (const char * buf, size_t size);
|
||||
|
||||
// Given a pointer to the start of the caller requested area
|
||||
// return a pointer to the start of the entire alloc\'d buffer.
|
||||
static char * StartPos (const char * caller);
|
||||
|
||||
// Access to the list.
|
||||
static wxMemStruct * GetHead () { return m_head; }
|
||||
static wxMemStruct * GetTail () { return m_tail; }
|
||||
|
||||
// Set the list sentinels.
|
||||
static wxMemStruct * SetHead (wxMemStruct * st) { return (m_head = st); }
|
||||
static wxMemStruct * SetTail (wxMemStruct * st) { return (m_tail = st); }
|
||||
|
||||
// If this is set then every new operation checks the validity
|
||||
// of the all previous nodes in the list.
|
||||
static bool GetCheckPrevious () { return m_checkPrevious; }
|
||||
static void SetCheckPrevious (bool value) { m_checkPrevious = value; }
|
||||
|
||||
// Checks all nodes, or all nodes if checkAll is true
|
||||
static int Check(bool checkAll = false);
|
||||
|
||||
// Print out the list of wxMemStruct nodes.
|
||||
static bool PrintList(void);
|
||||
|
||||
// Dump objects
|
||||
static bool Dump(void);
|
||||
|
||||
// Print statistics
|
||||
static bool PrintStatistics(bool detailed = true);
|
||||
|
||||
// Print out the classes in the application.
|
||||
static bool PrintClasses(void);
|
||||
|
||||
// Count the number of non-wxDebugContext-related objects
|
||||
// that are outstanding
|
||||
static int CountObjectsLeft(bool sinceCheckpoint = false);
|
||||
|
||||
// This function is used to output the dump
|
||||
static void OutputDumpLine(const wxChar *szFormat, ...);
|
||||
|
||||
static void SetShutdownNotifyFunction(wxShutdownNotifyFunction shutdownFn);
|
||||
|
||||
private:
|
||||
// Store these here to allow access to the list without
|
||||
// needing to have a wxMemStruct object.
|
||||
static wxMemStruct* m_head;
|
||||
static wxMemStruct* m_tail;
|
||||
|
||||
// Set to false if we're not checking all previous nodes when
|
||||
// we do a new. Set to true when we are.
|
||||
static bool m_checkPrevious;
|
||||
|
||||
// Holds a pointer to an optional application function to call at shutdown.
|
||||
static wxShutdownNotifyFunction sm_shutdownFn;
|
||||
|
||||
// Have to access our shutdown hook
|
||||
friend class wxDebugContextDumpDelayCounter;
|
||||
};
|
||||
|
||||
// Final cleanup (e.g. deleting the log object and doing memory leak checking)
|
||||
// will be delayed until all wxDebugContextDumpDelayCounter objects have been
|
||||
// destructed. Adding one wxDebugContextDumpDelayCounter per file will delay
|
||||
// memory leak checking until after destructing all global objects.
|
||||
|
||||
class WXDLLIMPEXP_BASE wxDebugContextDumpDelayCounter
|
||||
{
|
||||
public:
|
||||
wxDebugContextDumpDelayCounter();
|
||||
~wxDebugContextDumpDelayCounter();
|
||||
|
||||
private:
|
||||
void DoDump();
|
||||
static int sm_count;
|
||||
};
|
||||
|
||||
// make leak dump after all globals have been destructed
|
||||
static wxDebugContextDumpDelayCounter wxDebugContextDumpDelayCounter_File;
|
||||
#define WXDEBUG_DUMPDELAYCOUNTER \
|
||||
static wxDebugContextDumpDelayCounter wxDebugContextDumpDelayCounter_Extra;
|
||||
|
||||
// Output a debug message, in a system dependent fashion.
|
||||
void WXDLLIMPEXP_BASE wxTrace(const wxChar *fmt ...) WX_ATTRIBUTE_PRINTF_1;
|
||||
void WXDLLIMPEXP_BASE wxTraceLevel(int level, const wxChar *fmt ...) WX_ATTRIBUTE_PRINTF_2;
|
||||
|
||||
#define WXTRACE wxTrace
|
||||
#define WXTRACELEVEL wxTraceLevel
|
||||
|
||||
#else // wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
||||
|
||||
// These obsolete macros are still defined just in case anybody is using them,
|
||||
// but nobody should.
|
||||
#define WXDEBUG_DUMPDELAYCOUNTER
|
||||
|
||||
#define wxTrace(fmt)
|
||||
|
|
@ -352,6 +23,4 @@ void WXDLLIMPEXP_BASE wxTraceLevel(int level, const wxChar *fmt ...) WX_ATTRIBUT
|
|||
#define WXTRACE true ? (void)0 : wxTrace
|
||||
#define WXTRACELEVEL true ? (void)0 : wxTraceLevel
|
||||
|
||||
#endif // wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
||||
|
||||
#endif // _WX_MEMORY_H_
|
||||
|
|
|
|||
|
|
@ -149,19 +149,6 @@
|
|||
# define wxUSE_CRASHREPORT 0
|
||||
#endif /* compiler doesn't support SEH */
|
||||
|
||||
#if defined(__GNUWIN32__)
|
||||
/* These don't work as expected for mingw32 and cygwin32 */
|
||||
# undef wxUSE_MEMORY_TRACING
|
||||
# define wxUSE_MEMORY_TRACING 0
|
||||
|
||||
# undef wxUSE_GLOBAL_MEMORY_OPERATORS
|
||||
# define wxUSE_GLOBAL_MEMORY_OPERATORS 0
|
||||
|
||||
# undef wxUSE_DEBUG_NEW_ALWAYS
|
||||
# define wxUSE_DEBUG_NEW_ALWAYS 0
|
||||
|
||||
#endif /* __GNUWIN32__ */
|
||||
|
||||
/* MinGW32 doesn't provide wincred.h defining the API needed by this */
|
||||
#ifdef __MINGW32_TOOLCHAIN__
|
||||
#undef wxUSE_SECRETSTORE
|
||||
|
|
|
|||
|
|
@ -22,11 +22,8 @@
|
|||
// use debug CRT functions for memory leak detections in VC++ 5.0+ in debug
|
||||
// builds
|
||||
#undef wxUSE_VC_CRTDBG
|
||||
#if defined(_DEBUG) && defined(__VISUALC__)
|
||||
// it doesn't combine well with wxWin own memory debugging methods
|
||||
#if !wxUSE_GLOBAL_MEMORY_OPERATORS && !wxUSE_MEMORY_TRACING && !defined(__NO_VC_CRTDBG__)
|
||||
#define wxUSE_VC_CRTDBG
|
||||
#endif
|
||||
#if defined(_DEBUG) && defined(__VISUALC__) && !defined(__NO_VC_CRTDBG__)
|
||||
#define wxUSE_VC_CRTDBG
|
||||
#endif
|
||||
|
||||
#ifdef wxUSE_VC_CRTDBG
|
||||
|
|
|
|||
|
|
@ -126,60 +126,6 @@
|
|||
// is no overhead if you don't use it
|
||||
#define wxUSE_DEBUGREPORT 1
|
||||
|
||||
// Generic comment about debugging settings: they are very useful if you don't
|
||||
// use any other memory leak detection tools such as Purify/BoundsChecker, but
|
||||
// are probably redundant otherwise. Also, Visual C++ CRT has the same features
|
||||
// as wxWidgets memory debugging subsystem built in since version 5.0 and you
|
||||
// may prefer to use it instead of built in memory debugging code because it is
|
||||
// faster and more fool proof.
|
||||
//
|
||||
// Using VC++ CRT memory debugging is enabled by default in debug build (_DEBUG
|
||||
// is defined) if wxUSE_GLOBAL_MEMORY_OPERATORS is *not* enabled (i.e. is 0)
|
||||
// and if __NO_VC_CRTDBG__ is not defined.
|
||||
|
||||
// The rest of the options in this section are obsolete and not supported,
|
||||
// enable them at your own risk.
|
||||
|
||||
// If 1, enables wxDebugContext, for writing error messages to file, etc. If
|
||||
// __WXDEBUG__ is not defined, will still use the normal memory operators.
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 0
|
||||
#define wxUSE_DEBUG_CONTEXT 0
|
||||
|
||||
// If 1, enables debugging versions of wxObject::new and wxObject::delete *IF*
|
||||
// __WXDEBUG__ is also defined.
|
||||
//
|
||||
// WARNING: this code may not work with all architectures, especially if
|
||||
// alignment is an issue. This switch is currently ignored for mingw / cygwin
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 1 if you are not using a memory debugging tool, else 0
|
||||
#define wxUSE_MEMORY_TRACING 0
|
||||
|
||||
// In debug mode, cause new and delete to be redefined globally.
|
||||
// If this causes problems (e.g. link errors which is a common problem
|
||||
// especially if you use another library which also redefines the global new
|
||||
// and delete), set this to 0.
|
||||
// This switch is currently ignored for mingw / cygwin
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 0
|
||||
#define wxUSE_GLOBAL_MEMORY_OPERATORS 0
|
||||
|
||||
// In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If
|
||||
// this causes problems (e.g. link errors), set this to 0. You may need to set
|
||||
// this to 0 if using templates (at least for VC++). This switch is currently
|
||||
// ignored for MinGW/Cygwin.
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 0
|
||||
#define wxUSE_DEBUG_NEW_ALWAYS 0
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// global features
|
||||
|
|
|
|||
|
|
@ -16,7 +16,12 @@
|
|||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/memory.h"
|
||||
// This really shouldn't be done here, but keep including this header for
|
||||
// compatibility as it used to be included from here in the previous versions
|
||||
// of wx and a lot of code would be broken by removing it.
|
||||
#ifndef WXBUILDING
|
||||
#include "wx/string.h"
|
||||
#endif
|
||||
|
||||
#define wxDECLARE_CLASS_INFO_ITERATORS() \
|
||||
class WXDLLIMPEXP_BASE const_iterator \
|
||||
|
|
@ -161,47 +166,6 @@ inline T *wxCheckCast(const void *ptr)
|
|||
|
||||
#define wxStaticCast(obj, className) wxCheckCast<className>(obj)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// set up memory debugging macros
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
Which new/delete operator variants do we want?
|
||||
|
||||
_WX_WANT_NEW_SIZET_WXCHAR_INT = void *operator new (size_t size, wxChar *fileName = 0, int lineNum = 0)
|
||||
_WX_WANT_DELETE_VOID = void operator delete (void * buf)
|
||||
_WX_WANT_DELETE_VOID_WXCHAR_INT = void operator delete(void *buf, wxChar*, int)
|
||||
_WX_WANT_ARRAY_NEW_SIZET_WXCHAR_INT = void *operator new[] (size_t size, wxChar *fileName , int lineNum = 0)
|
||||
_WX_WANT_ARRAY_DELETE_VOID = void operator delete[] (void *buf)
|
||||
_WX_WANT_ARRAY_DELETE_VOID_WXCHAR_INT = void operator delete[] (void* buf, wxChar*, int )
|
||||
*/
|
||||
|
||||
#if wxUSE_MEMORY_TRACING
|
||||
|
||||
// All compilers get these ones
|
||||
#define _WX_WANT_NEW_SIZET_WXCHAR_INT
|
||||
#define _WX_WANT_DELETE_VOID
|
||||
|
||||
#if defined(__VISUALC__)
|
||||
#define _WX_WANT_DELETE_VOID_WXCHAR_INT
|
||||
#endif
|
||||
|
||||
// Now see who (if anyone) gets the array memory operators
|
||||
#if wxUSE_ARRAY_MEMORY_OPERATORS
|
||||
|
||||
// Everyone except Visual C++ (cause problems for VC++ - crashes)
|
||||
#if !defined(__VISUALC__)
|
||||
#define _WX_WANT_ARRAY_NEW_SIZET_WXCHAR_INT
|
||||
#endif
|
||||
|
||||
// Everyone except Visual C++ (cause problems for VC++ - crashes)
|
||||
#if !defined(__VISUALC__)
|
||||
#define _WX_WANT_ARRAY_DELETE_VOID
|
||||
#endif
|
||||
#endif // wxUSE_ARRAY_MEMORY_OPERATORS
|
||||
|
||||
#endif // wxUSE_MEMORY_TRACING
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Compatibility macro aliases DECLARE group
|
||||
// ----------------------------------------------------------------------------
|
||||
|
|
@ -476,22 +440,6 @@ inline wxObject *wxCheckDynamicCast(wxObject *obj, wxClassInfo *classInfo)
|
|||
|
||||
#include "wx/xti2.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// more debugging macros
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_DEBUG_NEW_ALWAYS
|
||||
#define WXDEBUG_NEW new(__TFILE__,__LINE__)
|
||||
|
||||
#if wxUSE_GLOBAL_MEMORY_OPERATORS
|
||||
#define new WXDEBUG_NEW
|
||||
#elif defined(__VISUALC__)
|
||||
// Including this file redefines new and allows leak reports to
|
||||
// contain line numbers
|
||||
#include "wx/msw/msvcrt.h"
|
||||
#endif
|
||||
#endif // wxUSE_DEBUG_NEW_ALWAYS
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Compatibility macro aliases IMPLEMENT group
|
||||
// ----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -132,60 +132,6 @@
|
|||
// is no overhead if you don't use it
|
||||
#define wxUSE_DEBUGREPORT 1
|
||||
|
||||
// Generic comment about debugging settings: they are very useful if you don't
|
||||
// use any other memory leak detection tools such as Purify/BoundsChecker, but
|
||||
// are probably redundant otherwise. Also, Visual C++ CRT has the same features
|
||||
// as wxWidgets memory debugging subsystem built in since version 5.0 and you
|
||||
// may prefer to use it instead of built in memory debugging code because it is
|
||||
// faster and more fool proof.
|
||||
//
|
||||
// Using VC++ CRT memory debugging is enabled by default in debug build (_DEBUG
|
||||
// is defined) if wxUSE_GLOBAL_MEMORY_OPERATORS is *not* enabled (i.e. is 0)
|
||||
// and if __NO_VC_CRTDBG__ is not defined.
|
||||
|
||||
// The rest of the options in this section are obsolete and not supported,
|
||||
// enable them at your own risk.
|
||||
|
||||
// If 1, enables wxDebugContext, for writing error messages to file, etc. If
|
||||
// __WXDEBUG__ is not defined, will still use the normal memory operators.
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 0
|
||||
#define wxUSE_DEBUG_CONTEXT 0
|
||||
|
||||
// If 1, enables debugging versions of wxObject::new and wxObject::delete *IF*
|
||||
// __WXDEBUG__ is also defined.
|
||||
//
|
||||
// WARNING: this code may not work with all architectures, especially if
|
||||
// alignment is an issue. This switch is currently ignored for mingw / cygwin
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 1 if you are not using a memory debugging tool, else 0
|
||||
#define wxUSE_MEMORY_TRACING 0
|
||||
|
||||
// In debug mode, cause new and delete to be redefined globally.
|
||||
// If this causes problems (e.g. link errors which is a common problem
|
||||
// especially if you use another library which also redefines the global new
|
||||
// and delete), set this to 0.
|
||||
// This switch is currently ignored for mingw / cygwin
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 0
|
||||
#define wxUSE_GLOBAL_MEMORY_OPERATORS 0
|
||||
|
||||
// In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If
|
||||
// this causes problems (e.g. link errors), set this to 0. You may need to set
|
||||
// this to 0 if using templates (at least for VC++). This switch is currently
|
||||
// ignored for MinGW/Cygwin.
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 0
|
||||
#define wxUSE_DEBUG_NEW_ALWAYS 0
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// global features
|
||||
|
|
|
|||
|
|
@ -14,12 +14,6 @@
|
|||
|
||||
#if !wxUSE_EXTENDED_RTTI // XTI system is meant to replace these macros
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/memory.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// forward declarations
|
||||
// ----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -122,60 +122,6 @@
|
|||
// is no overhead if you don't use it
|
||||
#define wxUSE_DEBUGREPORT 1
|
||||
|
||||
// Generic comment about debugging settings: they are very useful if you don't
|
||||
// use any other memory leak detection tools such as Purify/BoundsChecker, but
|
||||
// are probably redundant otherwise. Also, Visual C++ CRT has the same features
|
||||
// as wxWidgets memory debugging subsystem built in since version 5.0 and you
|
||||
// may prefer to use it instead of built in memory debugging code because it is
|
||||
// faster and more fool proof.
|
||||
//
|
||||
// Using VC++ CRT memory debugging is enabled by default in debug build (_DEBUG
|
||||
// is defined) if wxUSE_GLOBAL_MEMORY_OPERATORS is *not* enabled (i.e. is 0)
|
||||
// and if __NO_VC_CRTDBG__ is not defined.
|
||||
|
||||
// The rest of the options in this section are obsolete and not supported,
|
||||
// enable them at your own risk.
|
||||
|
||||
// If 1, enables wxDebugContext, for writing error messages to file, etc. If
|
||||
// __WXDEBUG__ is not defined, will still use the normal memory operators.
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 0
|
||||
#define wxUSE_DEBUG_CONTEXT 0
|
||||
|
||||
// If 1, enables debugging versions of wxObject::new and wxObject::delete *IF*
|
||||
// __WXDEBUG__ is also defined.
|
||||
//
|
||||
// WARNING: this code may not work with all architectures, especially if
|
||||
// alignment is an issue. This switch is currently ignored for mingw / cygwin
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 1 if you are not using a memory debugging tool, else 0
|
||||
#define wxUSE_MEMORY_TRACING 0
|
||||
|
||||
// In debug mode, cause new and delete to be redefined globally.
|
||||
// If this causes problems (e.g. link errors which is a common problem
|
||||
// especially if you use another library which also redefines the global new
|
||||
// and delete), set this to 0.
|
||||
// This switch is currently ignored for mingw / cygwin
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 0
|
||||
#define wxUSE_GLOBAL_MEMORY_OPERATORS 0
|
||||
|
||||
// In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If
|
||||
// this causes problems (e.g. link errors), set this to 0. You may need to set
|
||||
// this to 0 if using templates (at least for VC++). This switch is currently
|
||||
// ignored for MinGW/Cygwin.
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 0
|
||||
#define wxUSE_DEBUG_NEW_ALWAYS 0
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// global features
|
||||
|
|
|
|||
|
|
@ -125,60 +125,6 @@
|
|||
// is no overhead if you don't use it
|
||||
#define wxUSE_DEBUGREPORT 1
|
||||
|
||||
// Generic comment about debugging settings: they are very useful if you don't
|
||||
// use any other memory leak detection tools such as Purify/BoundsChecker, but
|
||||
// are probably redundant otherwise. Also, Visual C++ CRT has the same features
|
||||
// as wxWidgets memory debugging subsystem built in since version 5.0 and you
|
||||
// may prefer to use it instead of built in memory debugging code because it is
|
||||
// faster and more fool proof.
|
||||
//
|
||||
// Using VC++ CRT memory debugging is enabled by default in debug build (_DEBUG
|
||||
// is defined) if wxUSE_GLOBAL_MEMORY_OPERATORS is *not* enabled (i.e. is 0)
|
||||
// and if __NO_VC_CRTDBG__ is not defined.
|
||||
|
||||
// The rest of the options in this section are obsolete and not supported,
|
||||
// enable them at your own risk.
|
||||
|
||||
// If 1, enables wxDebugContext, for writing error messages to file, etc. If
|
||||
// __WXDEBUG__ is not defined, will still use the normal memory operators.
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 0
|
||||
#define wxUSE_DEBUG_CONTEXT 0
|
||||
|
||||
// If 1, enables debugging versions of wxObject::new and wxObject::delete *IF*
|
||||
// __WXDEBUG__ is also defined.
|
||||
//
|
||||
// WARNING: this code may not work with all architectures, especially if
|
||||
// alignment is an issue. This switch is currently ignored for mingw / cygwin
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 1 if you are not using a memory debugging tool, else 0
|
||||
#define wxUSE_MEMORY_TRACING 0
|
||||
|
||||
// In debug mode, cause new and delete to be redefined globally.
|
||||
// If this causes problems (e.g. link errors which is a common problem
|
||||
// especially if you use another library which also redefines the global new
|
||||
// and delete), set this to 0.
|
||||
// This switch is currently ignored for mingw / cygwin
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 0
|
||||
#define wxUSE_GLOBAL_MEMORY_OPERATORS 0
|
||||
|
||||
// In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If
|
||||
// this causes problems (e.g. link errors), set this to 0. You may need to set
|
||||
// this to 0 if using templates (at least for VC++). This switch is currently
|
||||
// ignored for MinGW/Cygwin.
|
||||
//
|
||||
// Default is 0
|
||||
//
|
||||
// Recommended setting: 0
|
||||
#define wxUSE_DEBUG_NEW_ALWAYS 0
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// global features
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
#include "wx/app.h"
|
||||
#include "wx/utils.h"
|
||||
#include "wx/stream.h"
|
||||
#include "wx/memory.h"
|
||||
#include "wx/math.h"
|
||||
#include "wx/stopwatch.h"
|
||||
#include "wx/timer.h"
|
||||
|
|
|
|||
|
|
@ -1,223 +0,0 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: memory.h
|
||||
// Purpose: interface of wxDebugContext
|
||||
// Author: wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/**
|
||||
@class wxDebugContext
|
||||
|
||||
A class for performing various debugging and memory tracing operations.
|
||||
|
||||
Full functionality (such as printing out objects currently allocated) is
|
||||
only present in a debugging build of wxWidgets, i.e. if the @c \__WXDEBUG__
|
||||
symbol is defined. wxDebugContext and related functions and macros can be
|
||||
compiled out by setting wxUSE_DEBUG_CONTEXT to 0 is setup.h
|
||||
|
||||
@library{wxbase}
|
||||
@category{debugging}
|
||||
|
||||
@see @ref overview_debugging
|
||||
*/
|
||||
class wxDebugContext
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Checks the memory blocks for errors, starting from the currently set
|
||||
checkpoint.
|
||||
|
||||
@return Returns the number of errors, so a value of zero represents
|
||||
success. Returns -1 if an error was detected that prevents
|
||||
further checking.
|
||||
*/
|
||||
static int Check(bool checkAll = false);
|
||||
|
||||
/**
|
||||
Performs a memory dump from the currently set checkpoint, writing to the
|
||||
current debug stream. Calls the @b Dump member function for each wxObject
|
||||
derived instance.
|
||||
|
||||
@return @true if the function succeeded, @false otherwise.
|
||||
*/
|
||||
static bool Dump();
|
||||
|
||||
/**
|
||||
Returns @true if the memory allocator checks all previous memory blocks for
|
||||
errors.
|
||||
|
||||
By default, this is @false since it slows down execution considerably.
|
||||
|
||||
@see SetCheckPrevious()
|
||||
*/
|
||||
static bool GetCheckPrevious();
|
||||
|
||||
/**
|
||||
Returns @true if debug mode is on.
|
||||
|
||||
If debug mode is on, the wxObject new and delete operators store or use
|
||||
information about memory allocation. Otherwise, a straight malloc and
|
||||
free will be performed by these operators.
|
||||
|
||||
@see SetDebugMode()
|
||||
*/
|
||||
static bool GetDebugMode();
|
||||
|
||||
/**
|
||||
Gets the debug level (default 1).
|
||||
|
||||
The debug level is used by the wxTraceLevel function and the WXTRACELEVEL
|
||||
macro to specify how detailed the trace information is; setting a
|
||||
different level will only have an effect if trace statements in the
|
||||
application specify a value other than one.
|
||||
|
||||
@deprecated
|
||||
This is obsolete, replaced by wxLog functionality.
|
||||
|
||||
@see SetLevel()
|
||||
*/
|
||||
static int GetLevel();
|
||||
|
||||
/**
|
||||
Prints a list of the classes declared in this application, giving derivation
|
||||
and whether instances of this class can be dynamically created.
|
||||
|
||||
@see PrintStatistics()
|
||||
*/
|
||||
static bool PrintClasses();
|
||||
|
||||
/**
|
||||
Performs a statistics analysis from the currently set checkpoint, writing
|
||||
to the current debug stream. The number of object and non-object
|
||||
allocations is printed, together with the total size.
|
||||
|
||||
@param detailed
|
||||
If @true, the function will also print how many objects of each class
|
||||
have been allocated, and the space taken by these class instances.
|
||||
|
||||
@see PrintStatistics()
|
||||
*/
|
||||
static bool PrintStatistics(bool detailed = true);
|
||||
|
||||
/**
|
||||
Tells the memory allocator to check all previous memory blocks for errors.
|
||||
By default, this is @false since it slows down execution considerably.
|
||||
|
||||
@see GetCheckPrevious()
|
||||
*/
|
||||
static void SetCheckPrevious(bool check);
|
||||
|
||||
/**
|
||||
Sets the current checkpoint: Dump and PrintStatistics operations will
|
||||
be performed from this point on. This allows you to ignore allocations
|
||||
that have been performed up to this point.
|
||||
|
||||
@param all
|
||||
If @true, the checkpoint is reset to include all memory allocations
|
||||
since the program started.
|
||||
*/
|
||||
static void SetCheckpoint(bool all = false);
|
||||
|
||||
/**
|
||||
Sets the debug mode on or off.
|
||||
|
||||
If debug mode is on, the wxObject new and delete operators store or use
|
||||
information about memory allocation. Otherwise, a straight malloc and free
|
||||
will be performed by these operators.
|
||||
|
||||
By default, debug mode is on if @c \__WXDEBUG__ is defined. If the application
|
||||
uses this function, it should make sure that all object memory allocated
|
||||
is deallocated with the same value of debug mode. Otherwise, the delete
|
||||
operator might try to look for memory information that does not exist.
|
||||
|
||||
@see GetDebugMode()
|
||||
*/
|
||||
static void SetDebugMode(bool debug);
|
||||
|
||||
/**
|
||||
Sets the debug level (default 1).
|
||||
|
||||
The debug level is used by the wxTraceLevel function and the WXTRACELEVEL
|
||||
macro to specify how detailed the trace information is; setting
|
||||
a different level will only have an effect if trace statements in the
|
||||
application specify a value other than one.
|
||||
|
||||
@deprecated
|
||||
This is obsolete, replaced by wxLog functionality.
|
||||
|
||||
@see GetLevel()
|
||||
*/
|
||||
static void SetLevel(int level);
|
||||
|
||||
/**
|
||||
Installs a function to be called at the end of wxWidgets shutdown.
|
||||
It will be called after all files with global instances of
|
||||
wxDebugContextDumpDelayCounter have run their destructors.
|
||||
|
||||
The shutdown function must be take no parameters and return nothing.
|
||||
*/
|
||||
static void SetShutdownNotifyFunction(wxShutdownNotifyFunction func);
|
||||
};
|
||||
|
||||
|
||||
|
||||
// ============================================================================
|
||||
// Global functions/macros
|
||||
// ============================================================================
|
||||
|
||||
/** @addtogroup group_funcmacro_log */
|
||||
///@{
|
||||
|
||||
/**
|
||||
@deprecated Use one of the wxLogTrace() functions or one of the
|
||||
wxVLogTrace() functions instead.
|
||||
|
||||
Calls wxTrace() with printf-style variable argument syntax. Output is
|
||||
directed to the current output stream (see wxDebugContext).
|
||||
|
||||
@header{wx/memory.h}
|
||||
*/
|
||||
#define WXTRACE(format, ...)
|
||||
|
||||
/**
|
||||
@deprecated Use one of the wxLogTrace() functions or one of the
|
||||
wxVLogTrace() functions instead.
|
||||
|
||||
Calls wxTraceLevel with printf-style variable argument syntax. Output is
|
||||
directed to the current output stream (see wxDebugContext). The first
|
||||
argument should be the level at which this information is appropriate. It
|
||||
will only be output if the level returned by wxDebugContext::GetLevel is
|
||||
equal to or greater than this value.
|
||||
|
||||
@header{wx/memory.h}
|
||||
*/
|
||||
#define WXTRACELEVEL(level, format, ...)
|
||||
|
||||
/**
|
||||
@deprecated Use one of the wxLogTrace() functions or one of the
|
||||
wxVLogTrace() functions instead.
|
||||
|
||||
Takes printf-style variable argument syntax. Output is directed to the
|
||||
current output stream (see wxDebugContext).
|
||||
|
||||
@header{wx/memory.h}
|
||||
*/
|
||||
void wxTrace(const wxString& format, ...);
|
||||
|
||||
/**
|
||||
@deprecated Use one of the wxLogTrace() functions or one of the
|
||||
wxVLogTrace() functions instead.
|
||||
|
||||
Takes @e printf() style variable argument syntax. Output is directed to the
|
||||
current output stream (see wxDebugContext). The first argument should be
|
||||
the level at which this information is appropriate. It will only be output
|
||||
if the level returned by wxDebugContext::GetLevel() is equal to or greater
|
||||
than this value.
|
||||
|
||||
@header{wx/memory.h}
|
||||
*/
|
||||
void wxTraceLevel(int level, const wxString& format, ...);
|
||||
|
||||
///@}
|
||||
|
||||
|
|
@ -1669,10 +1669,8 @@ void FormMain::PopulateWithLibraryConfig ()
|
|||
#endif
|
||||
|
||||
ADD_WX_LIB_CONF_GROUP("Debugging Settings")
|
||||
ADD_WX_LIB_CONF( wxUSE_DEBUG_CONTEXT )
|
||||
ADD_WX_LIB_CONF( wxUSE_MEMORY_TRACING )
|
||||
ADD_WX_LIB_CONF( wxUSE_GLOBAL_MEMORY_OPERATORS )
|
||||
ADD_WX_LIB_CONF( wxUSE_DEBUG_NEW_ALWAYS )
|
||||
ADD_WX_LIB_CONF( wxUSE_DEBUGREPORT )
|
||||
ADD_WX_LIB_CONF( wxUSE_STACKWALKER )
|
||||
ADD_WX_LIB_CONF( wxUSE_ON_FATAL_EXCEPTION )
|
||||
|
||||
ADD_WX_LIB_CONF_GROUP("Unicode Support")
|
||||
|
|
|
|||
10
setup.h.in
10
setup.h.in
|
|
@ -141,16 +141,6 @@
|
|||
|
||||
|
||||
|
||||
#define wxUSE_DEBUG_CONTEXT 0
|
||||
|
||||
#define wxUSE_MEMORY_TRACING 0
|
||||
|
||||
#define wxUSE_GLOBAL_MEMORY_OPERATORS 0
|
||||
|
||||
#define wxUSE_DEBUG_NEW_ALWAYS 0
|
||||
|
||||
|
||||
|
||||
#define wxUSE_EXCEPTIONS 0
|
||||
|
||||
#define wxUSE_EXTENDED_RTTI 0
|
||||
|
|
|
|||
|
|
@ -169,16 +169,8 @@ typedef pid_t GPid;
|
|||
|
||||
#define wxDIALOG_UNIT_COMPATIBILITY 1
|
||||
|
||||
#define wxUSE_DEBUG_CONTEXT 1
|
||||
|
||||
#define wxUSE_DEBUGREPORT 1
|
||||
|
||||
#define wxUSE_MEMORY_TRACING 0
|
||||
|
||||
#define wxUSE_GLOBAL_MEMORY_OPERATORS 0
|
||||
|
||||
#define wxUSE_DEBUG_NEW_ALWAYS 1
|
||||
|
||||
#define wxUSE_ON_FATAL_EXCEPTION 1
|
||||
|
||||
#define wxUSE_STACKWALKER 0
|
||||
|
|
|
|||
|
|
@ -143,7 +143,6 @@ OBJECTS1=fs_inet.obj,\
|
|||
list.obj,\
|
||||
log.obj,\
|
||||
longlong.obj,\
|
||||
memory.obj,\
|
||||
menucmn.obj,\
|
||||
mimecmn.obj,\
|
||||
module.obj,\
|
||||
|
|
@ -336,7 +335,6 @@ SOURCES = \
|
|||
listctrlcmn.cpp,\
|
||||
log.cpp,\
|
||||
longlong.cpp,\
|
||||
memory.cpp,\
|
||||
menucmn.cpp,\
|
||||
mimecmn.cpp,\
|
||||
module.cpp,\
|
||||
|
|
@ -576,7 +574,6 @@ lboxcmn.obj : lboxcmn.cpp
|
|||
list.obj : list.cpp
|
||||
log.obj : log.cpp
|
||||
longlong.obj : longlong.cpp
|
||||
memory.obj : memory.cpp
|
||||
menucmn.obj : menucmn.cpp
|
||||
mimecmn.obj : mimecmn.cpp
|
||||
module.obj : module.cpp
|
||||
|
|
|
|||
|
|
@ -131,27 +131,6 @@ const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] =
|
|||
{ wxDECLARE_EVENT_TABLE_TERMINATOR() };
|
||||
|
||||
|
||||
// wxUSE_MEMORY_TRACING considers memory freed from the static objects dtors
|
||||
// leaked, so we need to manually clean up all event tables before checking for
|
||||
// the memory leaks when using it, however this breaks re-initializing the
|
||||
// library (i.e. repeated calls to wxInitialize/wxUninitialize) because the
|
||||
// event tables won't be rebuilt the next time, so disable this by default
|
||||
#if wxUSE_MEMORY_TRACING
|
||||
|
||||
class wxEventTableEntryModule: public wxModule
|
||||
{
|
||||
public:
|
||||
wxEventTableEntryModule() { }
|
||||
virtual bool OnInit() override { return true; }
|
||||
virtual void OnExit() override { wxEventHashTable::ClearAll(); }
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxEventTableEntryModule);
|
||||
};
|
||||
|
||||
wxIMPLEMENT_DYNAMIC_CLASS(wxEventTableEntryModule, wxModule);
|
||||
|
||||
#endif // wxUSE_MEMORY_TRACING
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// global variables
|
||||
// ----------------------------------------------------------------------------
|
||||
|
|
@ -994,21 +973,6 @@ void wxEventHashTable::Clear()
|
|||
m_size = 0;
|
||||
}
|
||||
|
||||
#if wxUSE_MEMORY_TRACING
|
||||
|
||||
// Clear all tables
|
||||
void wxEventHashTable::ClearAll()
|
||||
{
|
||||
wxEventHashTable* table = sm_first;
|
||||
while (table)
|
||||
{
|
||||
table->Clear();
|
||||
table = table->m_next;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // wxUSE_MEMORY_TRACING
|
||||
|
||||
bool wxEventHashTable::HandleEvent(wxEvent &event, wxEvtHandler *self)
|
||||
{
|
||||
if (m_rebuildHash)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -16,7 +16,6 @@
|
|||
#ifndef WX_PRECOMP
|
||||
#include "wx/object.h"
|
||||
#include "wx/hash.h"
|
||||
#include "wx/memory.h"
|
||||
#include "wx/crt.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -89,61 +88,6 @@ bool wxObject::IsKindOf(const wxClassInfo *info) const
|
|||
return (thisInfo) ? thisInfo->IsKindOf(info) : false ;
|
||||
}
|
||||
|
||||
#if wxUSE_MEMORY_TRACING && defined( new )
|
||||
#undef new
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _WX_WANT_NEW_SIZET_WXCHAR_INT
|
||||
void *wxObject::operator new ( size_t size, const wxChar *fileName, int lineNum )
|
||||
{
|
||||
return wxDebugAlloc(size, (wxChar*) fileName, lineNum, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _WX_WANT_DELETE_VOID
|
||||
void wxObject::operator delete ( void *buf )
|
||||
{
|
||||
wxDebugFree(buf);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _WX_WANT_DELETE_VOID_CONSTCHAR_SIZET
|
||||
void wxObject::operator delete ( void *buf, const char *_fname, size_t _line )
|
||||
{
|
||||
wxDebugFree(buf);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _WX_WANT_DELETE_VOID_WXCHAR_INT
|
||||
void wxObject::operator delete ( void *buf, const wxChar *WXUNUSED(fileName), int WXUNUSED(lineNum) )
|
||||
{
|
||||
wxDebugFree(buf);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _WX_WANT_ARRAY_NEW_SIZET_WXCHAR_INT
|
||||
void *wxObject::operator new[] ( size_t size, const wxChar* fileName, int lineNum )
|
||||
{
|
||||
return wxDebugAlloc(size, (wxChar*) fileName, lineNum, true, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _WX_WANT_ARRAY_DELETE_VOID
|
||||
void wxObject::operator delete[] ( void *buf )
|
||||
{
|
||||
wxDebugFree(buf, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _WX_WANT_ARRAY_DELETE_VOID_WXCHAR_INT
|
||||
void wxObject::operator delete[] (void * buf, const wxChar* WXUNUSED(fileName), int WXUNUSED(lineNum) )
|
||||
{
|
||||
wxDebugFree(buf, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxClassInfo
|
||||
// ----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
#include "wx/intl.h"
|
||||
#include "wx/log.h"
|
||||
#include "wx/utils.h"
|
||||
#include "wx/memory.h"
|
||||
#include "wx/font.h"
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@
|
|||
#include "wx/dialog.h"
|
||||
#include "wx/msgdlg.h"
|
||||
#include "wx/textctrl.h"
|
||||
#include "wx/memory.h"
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/module.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
#include "wx/frame.h"
|
||||
#include "wx/icon.h"
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/memory.h"
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/module.h"
|
||||
#include "wx/crt.h"
|
||||
|
|
|
|||
|
|
@ -220,7 +220,6 @@
|
|||
#include <wx/mdi.h>
|
||||
#include <wx/mediactrl.h>
|
||||
#include <wx/memconf.h>
|
||||
#include <wx/memory.h>
|
||||
#include <wx/memtext.h>
|
||||
#include <wx/menu.h>
|
||||
#include <wx/menuitem.h>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue