Pro*C problem: memory leakage

From: Thierry Toussaint <ttoussaint_at_eft.be>
Date: Mon, 14 Feb 2000 15:54:38 GMT
Message-ID: <38A827BC.DAF25D2E_at_eft.be>


[Quoted] 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 Feb 14 2000 - 16:54:38 CET

Original text of this message