Chapter 15 Memory Management, Debugging, and Error Checking

Tracking down errors is an essential, if unglamorous, part of developing an application. This chapter describes the facilities that wxWidgets provides to detect memory problems and also to encourage “defensive programming”—checking for problems as early as possible—which makes for much more reliable and easily debugged software. We also explain when you should create objects on the heap and when to create them on the stack, and we discuss how to use the run-time type information facilities, the module mechanism, and wxWidgets C++ exception support. We finish with some general debugging tips.

Memory Management Basics

As in all C++ programming, you will create objects either ...

Get Cross-Platform GUI Programming with wxWidgets now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.