G
Greg
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?
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?