开发者

Compact framework AppVerifier and managed code. Lots of memory leaks found?

开发者 https://www.devze.com 2023-02-10 13:49 出处:网络
I\'m trying to find an unmanaged memory leak in my mobile project.I read that I should try and use AppVerifier to help find where the leak is.After running the program, I got a log that was +5mb!It ha

I'm trying to find an unmanaged memory leak in my mobile project. I read that I should try and use AppVerifier to help find where the leak is. After running the program, I got a log that was +5mb! It had so much data that I don't even know how to begin looking for where the problem is. I tried searching for my application in the log, but none of my methods are found. Almost all the leaks happen within mscoree3_5.dll

I make some P/Invokes, use Brushes, Fonts, Pens, Bitmaps, IImages (and other Imaging API stuff) but all of them can be traced (as far as I can tell) to a using or a .Dispose(). I might be mistaken in this assumption, but I don't kno开发者_开发技巧w how to tell! FxCop doesn't find any items that aren't disposed of, and everytime I read through the code, I can't find any either.

My question is, what is the easiest way to find where objects that can be disposed of but aren't, or unmanaged memory is not being cleared from within managed code? Also, what all needs to be released, disposed of, or whatever in the Imaging APIs (IImage interface, IImageFactory, etc)

Thank you for any help!


AppVerifier is a native app tool and will do you no good. You need to use the CLR Profiler and Remote Performance Monitor.

0

精彩评论

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