System.ReportMemoryLeaksOnShutdown

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

ReportMemoryLeaksOnShutdown: Boolean;

C++

extern DELPHI_PACKAGE bool ReportMemoryLeaksOnShutdown;

Properties

Type Visibility Source Unit Parent
variable public
System.pas
System.hpp
System System

Description

Report memory leaks on shutdown.

Set ReportMemoryLeaksOnShutdown to report memory leaks on shutdown.

The memory manager can report memory that was allocated but not freed by the time the memory manager shuts down. Such memory blocks are called memory leaks and are often the result of programming errors. When this global variable is set to True, the Memory Manager will scan the memory pool when it shuts down and report all unregistered memory leaks in a message dialog. The default value for ReportMemoryLeaksOnShutdown is False.

Expected memory leaks can be registered so the Memory Manager will ignore them during its checks for memory leaks. Use the procedures RegisterExpectedMemoryLeak and UnregisterExpectedMemoryLeak to control the memory areas that the Memory Manager checks for leaks.

Platform Support

The memory manager only supports the Windows platform. Making ReportMemoryLeaksOnShutdown True has no effect on other platforms, which use the Posix/32 memory manager.

See Also