Saturday, December 13, 2003, 12:01:25 PM, Niclas Hedhman wrote:
[snip]
> Bottom-line Q;
> Either release() is a requirement or it shouldn't exist. Which?
Independently of Avalon, I think that in a general-purpose component
management system (or how do you call these... :)), explicit releasing
should be discouraged, but allowed. Why? As Stephen said, user code
developers (as a Web application developer) can't be trusted to call
that (i.e. don't forget try{...}finally{release}). I 100% agree with
that. But COP systems are accessed not only from user code, but also
from "framework" code, where developers are more fussy coders (e.g. a
Web. App. *framework* developer). And, for some performance-optimized
lifestyles they will need explicit releasing; just consider pooling, or
use-once-and-discard objects.
So, I think that components that are accessible for app. code developers
should have lifestyle that requires *no* explicit releasing, but the
container should still support the usage of lifestyles that do need
explicit releasing, for programmers who work on lower lever systems
(e.g. on a Web app. framework). The default would be that "Don't use
release()!", with a the foot note "Except if you hack the guts of
something, and you *know* that a component requires release(). Don't
expose such object for user code developers.".
--
Best regards,
Daniel Dekany
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]