开发者

.NET framework issue? [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

C# memory leak?

Sorry if this is not the right place to post this, seeing as it's not strictly code related.

Basically, since the beginning of this work, a progra开发者_StackOverflow社区m which has worked flawlessly before has suddenly started throwing Out of Memory exceptions. After checking out the usage, I discovered the memory usage increases by a ridiculous 1mb per second! This happens on a part of the program that iterates over a collection, and calls many different methods - so it seems like these objects are staying in memory even after use.

What does this issue sound like to everyone else? I've been debugging the code, ensuring nothing's left open and all is disposed, but to no avail. I'm wondering if perhaps the .NET framework on the computer it runs from has become corrupt, and the garbage collection isn't running.

I plan to test on another computer later to hopefully prove this theory


Garbage collection will only clear up objects in the heap with no references left to them. Although you've ensured you're disposing everything it'll also be an idea to specifically null any of these references to objects after use.

Perhaps you can post the troublesome code?


Have a look at dotTrace tool. 10 days trial version is available.

Using it you can track what keeps the object reference to objects that should be removed from memory.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜