 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Viatcheslav V. Vassiliev Guest
|
Posted: Fri Aug 06, 2004 10:09 am Post subject: Re: freeing a recordset |
|
|
| Quote: | recordset := myFunc;
No, assigning this way will release current recordset and assign new |
| Quote: | myProcedure(var recordset: _Recordset)
Probably yes, especially if myProcedure is from WinAPI or from any MS code - |
it could expect that you will release recordset.
| Quote: | do I need to free the recordset after closing the form..?
No, form variables will be released, including strings, variants and |
interfaces.
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Gary" <nomail (AT) nomail (DOT) com> сообщил/сообщила в новостях следующее:
news:41133006$1 (AT) newsgroups (DOT) borland.com...
| Quote: |
hi,
I am assigning a recordset (_recordset) from
a datamodule like this:
with myAdodataset do begin
close ;
recordset := myFunc;
open ;
end ;
My question is: Do I need to set the recordset to nil before
assigning a fresh recordset from the function. I am worried
that I am not freeing resources properly. And do I need to free the
recordset after closing the form..?
Thanks.
|
|
|
| Back to top |
|
 |
danny heijl Guest
|
Posted: Fri Aug 06, 2004 7:40 pm Post subject: Re: freeing a recordset |
|
|
Viatcheslav V. Vassiliev schreef:
| Quote: |
No, assigning this way will release current recordset and assign new
|
But I found that if you do not call Close on the _recordset you will
leak memory like mad.
Danny
---
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|