"Victor Bazarov" <v.Abazarov@comAcast.netwrote in message
news:enk4rj$3qf$1@news.datemas.de...
Quote:
>
If your 'FSession' is essentially owned by FTable, then it might be
better if the ownership is actually expressed, and not implied.
>
|
Thanks for your reply, Victor. Looks like I am safe in trusting the order
of initialization and destruction.
No, 'FSession' is not owned by "FTable," in fact, the relationship is
actually the other way around -- a TSession owns zero or more TTables
(though my sample code does not reflect this). TSession is responsible for
destroying any TTables it owns when it is destroyed, but there are times
when a TTable must be destroyed without destroying the TSession that owns
it, in which case, the TSession must help with its destruction, which is why
I provide a custom deleter.
However, your question does help me to identify some issues that I still
need to think through as I design the system.
Thanks,
- Dennis