DelphiRio 4 Posted May 17, 2019 (edited) Hi, I'm facing a problem that my app uses a lot of RAM. The main data structure is a tree, it uses TList<T> to hold children (called node). When the app runs, it creates about 3600 nodes. But the memory is 400MB. The InstanceSize of node is about 200 bytes only, the data is not much, about 1KB each node, so it consumes about 4MB. I tested with default memory manager, FastMM4, same result. My question is: is there any tool to show how many object instances in the app (count + memory size)? Thank you Edited May 17, 2019 by DelphiRio Share this post Link to post
Stefan Glienke 2002 Posted May 17, 2019 Make procedure FastMM4.CheckBlocksOnShutdown(ACheckForLeakedBlocks: Boolean); accessible in the interface section and simply call it. Share this post Link to post
DelphiRio 4 Posted May 17, 2019 12 minutes ago, Stefan Glienke said: Make procedure FastMM4.CheckBlocksOnShutdown(ACheckForLeakedBlocks: Boolean); accessible in the interface section and simply call it. Called FastMM4.CheckBlocksOnShutdown(True) and FastMM4.CheckBlocksOnShutdown(False), nothing happens. My app is well tested and no memory leak! Share this post Link to post
Stefan Glienke 2002 Posted May 17, 2019 When you call that procedure while objects are allocated it will list them! Share this post Link to post