If the Open () under the condition of normal, repeat the above operation, the program memory does not increase,
Could you tell me whether can be understood as the Open will create some space in memory, but the exception that space and have not released, cause the next Open () will be to Open up new space again, so that in exceptional cases kept Open - "Close," the Open - "Close... Can make the program memory is kept growing,
If there is a solution:)
Thank you:) first
CodePudding user response:
TSQLConnection the Open method will call SetConnected function, and then according to the condition, might call DoConnect method, in DoConnect approach will create some TStringList object, such as then calls a lot of functions for the operation of the data connection, if you can't guarantee every Open normal execution, suggest using try... The catch will enclosed the Open method,CodePudding user response:
The building Lord the XE is a fewCodePudding user response:
Thank you very much demon elder brother and. help solve the problem:) I was in the try.. The catch...Try
{
SQLConnection - & gt; Close ();
. Parameter assignment operation;
SQLConnection - & gt; The Open ();
}
The catch (... )
{
return false;
}
I was under the condition of the abnormal network connection (such as cable off), and then catch, then I will continue to repeat the above operation, then I found there are kept up in ~ ~ ~ ~ ~ is also an experiment, is under the condition of normal connection, repeat the above operation, found that memory is normal, does not increase, I do not know how to solve, very upset, still hope demon elder brother tall person to give directions, thank you:)
CodePudding user response:
His crown,CodePudding user response:
His crown,CodePudding user response:
For a long time of postedHere to ask the building Lord, TSQLConnect program released, prompt lack DBExpress. BPL, the building Lord encountered this problem?
CodePudding user response: