Re: Is this correct? (TADOConnection)
- From: Bill Dekleris <quasar@xxxxxx>
- Date: Sat, 21 Oct 2006 10:39:32 +0300
Frederico,
if you take a look at FConnectionObject's declaration, you'l see that it is a "pointer" to an interface (ADOInt._Connection) that descends from IInterface, and as such it is reference counted. So, when you assign nil to this pointer, the underlying object is freed. So, yes, the command is correct.
Bill Dekleris
Quasar Software.
--
-----------------------------------------------------------------------------------------
http://www.infosnap.eu
Home page of InfoSnap - the powerful, all-purpose information and knowledge-base manager.
-----------------------------------------------------------------------------------------
Frederico Pissarra wrote:
Hello!!!.
Taking a look at ADODB unit in $(DELPHI)\Source\VCL (I'm using D7 here), you can see the following code:
-------------%<------------cut here -------------%<------------------------
destructor TADOConnection.Destroy;
...
FConnectionObject := nil;
...
end;
-------------%<------------cut here -------------%<------------------------
Notice that FConnectionObject is not released (calling IUnknown.Release), but the reference simply will point to nil.
Is this correct?
[]s
Fred
- Follow-Ups:
- Re: Is this correct? (TADOConnection)
- From: Frederico Pissarra
- Re: Is this correct? (TADOConnection)
- References:
- Is this correct? (TADOConnection)
- From: Frederico Pissarra
- Is this correct? (TADOConnection)
- Prev by Date: Re: TADODataset.Filter?
- Next by Date: Re: TADODataset.Filter?
- Previous by thread: Re: Is this correct? (TADOConnection)
- Next by thread: Re: Is this correct? (TADOConnection)
- Index(es):
Relevant Pages
|