Pro*C 8.0 Memory leak problem
From: Thierry Toussaint <ttoussaint_at_eft.be>
Date: Mon, 17 Jan 2000 10:26:28 GMT
Message-ID: <3882F05F.C582F1E_at_eft.be>
EXEC SQL END DECLARE SECTION; strcpy(tidFQ.arr,"02020000");
tidFQ.len=strlen(tidFQ.arr);
strcpy(partition.arr,"3");
partition.len=strlen(partition.arr);
}
Date: Mon, 17 Jan 2000 10:26:28 GMT
Message-ID: <3882F05F.C582F1E_at_eft.be>
Hello everybody!
I have a memory leak problem when proceeding to UPDATE statements. The problem occurs when I use host variables, but does not occur when I use hardcoded values.
I use Pro*C version 8.0.4.0.0 and Borland C++5.01
In the example below the memory leak problem does not occur when replacing host variables with fixed values
EXEC SQL BEGIN DECLARE SECTION;
VARCHAR tidFQ[9];
VARCHAR partition[2];
EXEC SQL END DECLARE SECTION; strcpy(tidFQ.arr,"02020000");
tidFQ.len=strlen(tidFQ.arr);
strcpy(partition.arr,"3");
partition.len=strlen(partition.arr);
for (long i = 0 ; i < 100000 ; i++)
{
EXEC SQL UPDATE FORMAT_QUEUE
SET EVENTID = '007'
WHERE TID = :tidFQ AND PARTITION = :partition;
if (sqlca.sqlcode<0)
{
cout << "A problem occured";
}
EXEC SQL COMMIT WORK;
cout << i << endl;
}
Any hint would help.
Thanks! Received on Mon Jan 17 2000 - 11:26:28 CET
