G
Guest
I have a program which is looping through a data reader, taking the record
which is read, creating an instance of a class which respresents that record,
and then inserting that record into a database.
As I am looking at the task manager in the performance tab, the PF Usage
continues to rise until the machine halts with a unavailable memory error.
The procedures which insert the record are all static methods. The only
substative thing which I can see which would/should be eating at the memory
is the creation of an instance of the class which holds the row in the table.
After I am done inserting the record, is there something I need to do to
remove the record from memory? Why would PF Usage continue to rise and
seeminly never drop size?
Here is an example of my loop.....
while (dr.Read())
{
readCnt++;
switch (tblToCopy)
{
case "PS_ALLOC_STEP_TBL":
PS_ALLOC_STEP_TBL rec = new
DBUtilities.GL.Tables.PS_ALLOC_STEP_TBL(dr);
ok =
PS_ALLOC_STEP_TBL_DAL.Insert_PS_ALLOC_STEP_TBL(cmTo, rec);
break;
}
if (!ok)
{ TerminateProcessing(); }
}
dr.Close();
Thanks in advance for your assistance!
which is read, creating an instance of a class which respresents that record,
and then inserting that record into a database.
As I am looking at the task manager in the performance tab, the PF Usage
continues to rise until the machine halts with a unavailable memory error.
The procedures which insert the record are all static methods. The only
substative thing which I can see which would/should be eating at the memory
is the creation of an instance of the class which holds the row in the table.
After I am done inserting the record, is there something I need to do to
remove the record from memory? Why would PF Usage continue to rise and
seeminly never drop size?
Here is an example of my loop.....
while (dr.Read())
{
readCnt++;
switch (tblToCopy)
{
case "PS_ALLOC_STEP_TBL":
PS_ALLOC_STEP_TBL rec = new
DBUtilities.GL.Tables.PS_ALLOC_STEP_TBL(dr);
ok =
PS_ALLOC_STEP_TBL_DAL.Insert_PS_ALLOC_STEP_TBL(cmTo, rec);
break;
}
if (!ok)
{ TerminateProcessing(); }
}
dr.Close();
Thanks in advance for your assistance!