在混合环境中检测内存泄漏(托管-非托管) [英] Detecting memory leak in mixed environment(Managed-Unmanaged)

查看:101
本文介绍了在混合环境中检测内存泄漏(托管-非托管)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用VC ++ MFC 6.0编写的应用程序.最近通过在vs2008中进行编译升级到了.NET 3.5,并通过使用托管和非托管环境向其中添加了一些WPF应用程序.基本上在Win32窗口上托管WPF.如果我只是打开WPF应用程序窗口,则内存将保持1KB/10秒的速度增长.我曾尝试使用.NET Memory Profiler&蚂蚁内存分析器.但是两者都不能帮助我发现泄漏!!我已经从托管的WPF应用程序中删除了所有WPF控件.它只包含一个只有框架的页面.但是仍然发生泄漏!!请问有人可以帮我造成应用程序内存增加的原因吗?

I've an application written in VC++ MFC 6.0. Recently got upgraded to .NET 3.5 by compiling in vs2008 and added some WPF applications to it by using managed and unmanaged environment. Basically hosting WPF on win32 window. If I just open a WPF app window, memory keeps going up like 1KB/10 secs. I've tried using .NET Memory profiler & Ants memory profiler. But both are not helping me in detecting the leaks!! I've removed all the WPF controls from the hosted WPF application. It just contains a page having just a frame. But still the leak happens!! Would some one please help me what could cause the application memory go up?

推荐答案

好吧,经过一番灵魂搜索,发现泄漏实际上是由于框架中的错误引起的. 阅读更多 http://social.msdn.microsoft .com/Forums/zh/wpf/thread/5b9ae245-9067-4ca4-b846-180db9f7bde5

Well, after some soul searching, found out that the leak is actually due to a bug in the framework. Read this for more http://social.msdn.microsoft.com/Forums/zh/wpf/thread/5b9ae245-9067-4ca4-b846-180db9f7bde5

这篇关于在混合环境中检测内存泄漏(托管-非托管)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆