On Wed, 13 Feb 2002 19:57, Leif Mortenson wrote:
> Wouldn't it also be possible just to keep track of the number of lookups
> - releases. Then when you want to dispose the ComponentManager go into
> a loop. Call dispose on any components whose count is 0. Disposing them
> should release other components. Repeat. If you reach a point where
> you don't have any components with a count of 0, then this is an error
> and a warning should be displayed before going ahead and disposing the
> rest of them.
Yep ... but it is a strategy I recall from my C++/COM days which I still
shudder at ;) I remember quite a few cases where I had to debug each others
code because components where forced to be shutdown and couldn't gracefully
go down. Especially when there is circular dependencies that creep in without
you noticing ;)
> This way the ComponentManager takes care of the dependencies on its own
> without requiring the developer to set up their dependencies correctly.
True it is easier in shortterm and much less complex.
--
Cheers,
Pete
----------------------------------------------------
"The only way to discover the limits of the possible
is to go beyond them into the impossible."
-Arthur C. Clarke
----------------------------------------------------
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>