Re: Memory Leak
From: CJ Taylor (youalreadyknowit_at_itsoneverylistintheworld.com)
Date: 03/13/04
- Next message: Big D: "object orientation question"
- Previous message: Klaus Löffelmann: "Re: Generating Windows Forms out of XML"
- In reply to: Greg: "Memory Leak"
- Next in thread: Greg: "Re: Memory Leak"
- Reply: Greg: "Re: Memory Leak"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 13 Mar 2004 00:24:17 GMT
Don't believe task manager. It's not really good measurement of memory your
using.
-CJ
"Greg" <nospam@nospam.com> wrote in message
news:OKcLS6ICEHA.2620@TK2MSFTNGP12.phx.gbl...
> Anyone know of a good program for locating memory leaks? I've been double
> checking my code and I'm not seeing anywhere that I'm not freeing objects,
> etc after using them but memory keeps going up and up. It gets as high as
> 300MB within a couple hours when it starts off at 20MB. I have a lot of
> code and use Microsoft SQL Server heavily. Frequently I use arrays,
> SqlClient objects, and RegEx. I use dispose with anything that has it and
=
> nothing for everything else.
>
> Each function that talks to the DB creates and free's its own connection
and
> objects. I'm wondering if this is part of the problem because it creates
> and frees the sqlconnection, sqlcommand, and sqldatareader many times per
> minute (not really the most efficient thing to do). I've tried calling
> GC.Collect() every 30 seconds but it doesn't look like that's helping,
which
> makes wonder if things are really being freed.
>
> Am I missing something?
>
>
- Next message: Big D: "object orientation question"
- Previous message: Klaus Löffelmann: "Re: Generating Windows Forms out of XML"
- In reply to: Greg: "Memory Leak"
- Next in thread: Greg: "Re: Memory Leak"
- Reply: Greg: "Re: Memory Leak"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|