Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Nick Rumble — — source: Informix-list mailing list archive (1991-1998)
Steve Breuer wrote in message <6i3f9s$kak@bgtnsc03.worldnet.att.net>...
>Nick Rumble <rumbln@tetraworld.com> wrote in article
><893682006.2920.0.nnrp-04.c2d9cf02@news.demon.co.uk>...
>> Is anyone aware of problems with ESQL/C (7.?) causing a memory leak in
>> Online (7.12 -> 7.23) by not freeing memory off following a calling to
>> $FREE. A typical scenario might be:
>>
>> $CHAR col2val[10];
>>
>> for (i = 0; i < 1000; i++)
>> {
>>
>> $PREPARE p1 FROM SELECT * from table where col1 > 'A' and col2 = ?;
>>
>> $DECLARE c1 CURSOR WITH HOLD FOR p1;
>>
>> $EXECUTE c1 USING $col2val;
>>
>> $FETCH c1 INTO .....;
>>
>> $CLOSE c1;
>>
>> $FREE p1;
>>
>> }
>
>You missed freeing the cursor after you closed it.
>
> $FREE c1;
>
>Steve
I thought that freeing the prepared statement used to declare the cursor,
implicitely freed the cursor ?
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.