If TErrorDialog causes a plugin or other dynamic library to load, e.g. a JPEG handler or SQL driver, then this memory is lost to the system and will not be freed until the plugin is unloaded when the QApplication exits (assuming the shared library is not now being used by another process). Even a perfectly coded TErrorDialog may display this behaviour.
As others have pointed out, there are tools for finding actual memory leaks.
Bookmarks