[yunqa.de] Re: TDISQLite3Statement memory leak?

  • From: "Clyde" <clyde@xxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Mon, 07 Jul 2008 16:56:15 +0800

>
>You do not see a call to TDISQLite3UniDirStatement.Free in the demos
>because they use TDISQLite3UniDirStatement dropped on a form. This means
>that Delphi automatically creates and destroys its instances during
>application start-up and shut-down. This supersedes calls to Create and
>Free.

Now you have me confused. I am not using TDISQLite3UniDirStatement, but 
TDISQLite3Statement. There is no component for this so you can't drop it on a 
form.

I can't find anything in the help about TDISQLite3UniDirStatement only 
TDISQLite3UniDirQuery which is totally different to what I am using as 
TDISQLite3UniDirQuery is a Tdataset descendant.

>
>TDISQLite3UniDirStatement.Close = TDataSet.Close
>
>Quote from the Delphi help: "Call Close to set the Active property of a
>dataset to false. When Active is false, the dataset is closed; it cannot
>read or write data and data-aware controls can?t use it to fetch data or
>post edits."

That comment confuses me more. I am not using a Tdataset descendant so it 
shouldn't apply. All of your comments here about tdataset are just not relevent 
for me in this case because I am wanting to use your Delphi Wrapper around 
sqlite3_stmt.

My understanding is the TDISQLite3Statement is a wrapper class that you have 
created from scratch and has no descendant. It has nothing to do with a 
Tdataset, correct?

Everything in your reply is quoting TDISQLite3UniDirStatement, but that is not 
what I am using.

Are you saying they are the same thing?

TDISQLite3Statement seems to me to be a good way to access tables without the 
overhead of a tdataset descendant.

Shouldn't you at least have one example that uses TDISQLite3Statement so we can 
see the correct way to iterate through a table and close it down properly?

That way newbies like me probably wouldn't run into this issue.

Thanks
Clyde


_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: