ADOQuery dont free up memory when freed
From: Erik Aaskoven (list_at_efaktum.dk)
Date: 11/30/03
- Next message: Mike Shkolnik: "Re: Reading DB structure"
- Previous message: Viatcheslav V. Vassiliev: "Re: Reading DB structure"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Nov 2003 06:36:27 -0800
HI
I Am working on a application which uses ADOQuery to access my
database. I Have to be able to create and then free the query when
done, because it run in a dll, it
works ok except that the memory is not freed completely, and my
application
eventualy dies.
This little code snippet demonstrates the problem, can anyone help me
find a solution.
For this test i simply created a form with a button when clicked
excutes the following
I Use Delphi 7
Query := TADOQuery.Create(nil);
query.ConnectionString := ANY CONNECTION STRING;
Query.SQL.Clear;
Query.SQL.Insert(0,'SELECT * FROM table');
Query.Open;
Query.Close;
Query.Free;
Query := nil;
It seem to bee the SQL that is the problem, because not opening and
closing the query memory is still leaking, and if i just create and
free the query no memory is leaking.
Hope someone can help
Thanks
Erik
- Next message: Mike Shkolnik: "Re: Reading DB structure"
- Previous message: Viatcheslav V. Vassiliev: "Re: Reading DB structure"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]