Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

isc_dsql_allocate_statement leaks memory or what?, help!!!

8 views
Skip to first unread message

Roberto aritos

unread,
Oct 20, 2001, 4:14:18 AM10/20/01
to

Hi There,

Is there any reason to why isc_dsql_allocate_statement function, if
called many times with isc_dsql_free_statement, eats up memory? I have a
loop, that runs queries, that allocates statement, prepare, sets up, run
the query, then frees the statement, but this process eats 16K-32K on
each loop.
After four-day trial&error, I discovered that
isc_dsql_allocate_statement is the key. If I allocate a statement once,
and use it for every query, no leaking at all. But the question is, I
still use isc_dsql_free_statement at the end of each loop, which,as I
understand, should free the resources I alloced with
isc_dsql_free_statement. If this function frees the resources, how am I
preparing freed statement and running the next query?(I actually run
559000 queries with no crash or memory leak.). I do carefull error
checking on every point.

Am I missing something? I don't want to set up a wrong logic to run
queries.

I really appreciate if somebody shares his/her experiences with these
functions.

Roberto

Martin Fu

unread,
Oct 21, 2001, 2:34:42 AM10/21/01
to inte...@mers.com
Hello Roberto,

What's your syntax upon freeing the statement ? I'm using

isc_dsql_free_statement(status_vector, &m_stmtHandle, DSQL_drop);

and it's working fine.

I don't have the manual to reference to but I do remember if I'm not using
DSQL_drop, there appears to be memory not being freed.

HTH.

Martin Fu

>_______________________________________________
>Interbase mailing list
>Inte...@mers.com
>http://mers.com/mailman/listinfo/interbase
>InterBase Search Engine - http://www.mers.com/searchsite.html


0 new messages