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
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