FastMM是否检测到所有内存泄漏

编程入门 行业动态 更新时间:2024-10-08 02:19:21
本文介绍了FastMM是否检测到所有内存泄漏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 有人最近建议(我的程序永远不会释放内存,为什么?)我的程序泄漏了一些内存。我有FastMM设置为侵略性,它报告没有内存泄漏,当我关闭程序。

无论如何,我想知道FastMM中是否有内存泄漏?

更新:我不会亲自使用Win API来分配内存。但我恐怕我使用的第三方组件(不是很多)可能会使用它。可以让我知道FastMM无法拦截的所有可能的API调用?我会在我的代码中搜索他们。谢谢。

Delphi 7,Win 7 32位 FastMM 4.97 我对接口不感兴趣。

解决方案

不,只有内存泄漏,哪个内存被FastMM分配。

编辑: 也许答案看起来是包装但不是!如果有人检查 FastMM haw是否可以看到每个内存分配指针被推送(并在FreeMem中弹出)到一个堆栈(有更多的堆栈,依赖于内存大小)所以在关闭应用程序结束时,FastMM只检查堆栈,如果堆栈中有东西,如果是,则报告内存泄漏!

Somebody suggested recently ( My program never releases the memory back. Why? ) that my program leaks some memory. I have FastMM set to aggressive and it reports no memory leaks when I shutdown the program.

Anyway, I would like to know if there can be memory leaks that are no detected by FastMM?

Update: I don't personally use Win API to allocate memory. But I am afraid that some 3rd party components I use (not so many) may use it. Can you let me know all possible API calls that FastMM cannot intercept? I will do a search in my code for them. Thanks.

Delphi 7, Win 7 32 bit FastMM 4.97 I am not interested about interfaces.

解决方案

No, only memory leaks which memory was alocated by FastMM.

EDIT: Maybe the answer looks wrapped but it is not! If anyone check the FastMM haw is made than can see that every pointer of memory alocation is pushed (and poped out at FreeMem) in to one of stacks (there is more stacks, depend of memory size) so at the end of closing application the FastMM only check stacks, if something in stacks, and if it is, than report memory leak!

更多推荐

FastMM是否检测到所有内存泄漏

本文发布于:2023-11-26 21:52:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1635338.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:检测到   内存   FastMM

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!