Hi
I have a Visual Studio 2005 c# windows application that keep using more and
more memory and I can't seem to see where the problem is.
Is there someway to see what resources are used and how much memory they
take ? I suspect some datasets/connections not beeing closed but can't seem
to find the place.
Jack
Peter Bromberg [C# MVP] - 17 Feb 2008 01:01 GMT
There are several good memory profiler applications / addins available. But
frankly, the best thing to do is carefully review your code and only use a
programming pattern that insures your connections are indeed closed even if
an exception is thrown, e.g. the using ( xxx) { ... } construct along with
try / catch / finally, with the connection being closed in the finally code
block.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com
> Hi
>
[quoted text clipped - 6 lines]
>
> Jack
Rad [Visual C# MVP] - 19 Feb 2008 20:20 GMT
> Hi
>
[quoted text clipped - 6 lines]
>
> Jack
Get yourself a good profiler and it will explain to you the consumption of
your memory in terms of actual usage, objects created, etc. Try RedGate
ANTS (red-gate.com) or JetBrains dotTrace (jetbrains.com)

Signature
http://www.thinkersroom.com/bytes