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

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

问题描述

我有一个用 VC++ MFC 6.0 编写的应用程序.最近通过在 vs2008 中编译升级到 .NET 3.5,并通过使用托管和非托管环境向其中添加了一些 WPF 应用程序.基本上在 win32 窗口上托管 WPF.如果我只是打开一个 WPF 应用程序窗口,内存会以 1KB/10 秒的速度持续增长.我试过使用 .NET Memory Profiler &Ants 内存分析器.但是两者都没有帮助我检测泄漏!!我已经从托管的 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天全站免登陆