Home > Back-end >  Could you tell me how to release the memory after ADOQquery use, thank you!
Could you tell me how to release the memory after ADOQquery use, thank you!

Time:09-18

ADOQ_tongyong - & gt; SQL - & gt; The Clear ();
ADOQ_tongyong - & gt; SQL - & gt; Text=SQL;
ADOQ_tongyong - & gt; Prepared;
ADOQ_tongyong - & gt; The Open ();

With the Close () can release the memory?

CodePudding user response:

General:
AnsiString ss;
Ss="Select the from is induced on daily fluid production output AllRec where well number='1 Wells'";
ADOQuery1 - & gt; Close ();//before the Close
ADOQuery1 - & gt; SQL - & gt; The Clear ();
ADOQuery1 - & gt; SQL - & gt; Add (ss);
ADOQuery1 - & gt; The Open ();//the select statement of result set in the Open (), insert, delete, update statements, such as using ADOQuery1 - & gt; ExecSQL ();

CodePudding user response:

The last time did not Close, the destructor will do,

CodePudding user response:

ADOQuery1 - & gt; Close () can release data memory
The delete ADOQuery1 can release the memory data and component itself

CodePudding user response:

Agree with upstairs!!!!!!

CodePudding user response:

Yes, agree with upstairs!
  • Related