Subject | Re: [IBO] How to clean up resources at closing program ? |
---|---|
Author | Tanno Vorenkamp |
Post date | 2003-08-18T10:35:11Z |
Sorry, for the previous e-mail I was to fast with clicking send
Thanks Helen, but still there is something unclear for me
the destructor of the connection (that is automatcally called at destruction
of it's owner)
will call a Disconnect and this in it's turn will ensure that the
transactions do a cleanup
But how does this work ? By calling the unprepare an close functions of the
Dataset functions ?
If so, then why can the dataset components not call this in their own
destructor ?
components
Do you mean with this that the Dataset components should not be destroyed
before
the Connection and Transaction components ?
I guess that what I want to know about the magic behind the screens is, if
each component
(TIB_Transaction, TIB_Connection and Dataset components) clean up their own
things
independently or if they need each other, which implies that there should
alway be a specific
creation and thus destruction order of the components
And If the latter is the case then what is the specific creation order ?
Thanks Helen, but still there is something unclear for me
> No, in a clean application, the opposite. Connection.Disconnect willOK, so you mean that in the most simple case
> ensure that the transactions associated with it will be made to do their
> cleanup. Connection.Disconnect will ultimately get called by the owner of
> the connection, anyway.
the destructor of the connection (that is automatcally called at destruction
of it's owner)
will call a Disconnect and this in it's turn will ensure that the
transactions do a cleanup
But how does this work ? By calling the unprepare an close functions of the
Dataset functions ?
If so, then why can the dataset components not call this in their own
destructor ?
> This is a propos one part of your question, which was about having queryobjects
> objects located on a different form to the connection object. This is just
> fine as long as you keep to the basic Delphi rules of ensuring that
> are always able to destroy their own creations without interference.Yes, but what do you mean specifically in the case of Connection and Dataset
components
Do you mean with this that the Dataset components should not be destroyed
before
the Connection and Transaction components ?
I guess that what I want to know about the magic behind the screens is, if
each component
(TIB_Transaction, TIB_Connection and Dataset components) clean up their own
things
independently or if they need each other, which implies that there should
alway be a specific
creation and thus destruction order of the components
And If the latter is the case then what is the specific creation order ?
>___________________________________________________________________________
>
> IB Objects - direct, complete, custom connectivity to Firebird orInterBase
> without the need for BDE, ODBC or any other layer.___________________________________________________________________________
>
> http://www.ibobjects.com - your IBO community resource for Tech Infopapers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>