You can use the following techniques to optimize heap memory usage:
eliminating memory leaks
shortening the lifecycle of heap objects
reducing the overhead of allocated objects
tuning the allocator
Information on the types of memory leaks found by Memory Analysis, and how to configure the tool to report leaks, is given in
Memory leaks. Information on the other three techniques is given in the sections that follow.