开发者

FastMM, stack trace memory for leaks in dynamicly loaded DLL, compiled with runtime packages

I'm using FastMM together with JCL Debug info to trace memory leaks in my application. However I have plugins which are dlls compiled in Delphi, both dlls and main application use common runtime packages. Now, when I'm shutting down the application, it generates memory leaks report in text file which is fine, but it contains stack traces only for main application. If memory leak occurs in plugin dll, the stack trace leads to LoadPlugins; procedure in main application! Of course开发者_高级运维 my plugins contain JCL debug data (it's inserted into .dll binary).

Where is the problem? Is that because of runtime packages usage? Or some switch (define) which I forgot to enable/disable? Thanks in advance


Have you set the FullDebugMode options and the Memory Manager Sharing Options (ShareMM and following) in FastMM4Options.inc? Have you also compiled with debug infos?


Pierre, author of FastMM has answered my question. If anyone is interested, the solution is not to unload plugins at shutdown in order to keep stack traces & object types accessible. This however caused tons of bugs on shutdown (since FastMM was unloaded twice or so), so finally I had to move FastMM to shared package...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜