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:
Vadim Zeitlin 2023-01-05 18:59:11 +01:00
parent bdc260bf53
commit e89f05faba
42 changed files with 20 additions and 2412 deletions

View file

@ -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-??-??)
----------------------------

View file

@ -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.}

View file

@ -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