Hi All,
Hope all is going well!
Just wanted to ask a quick question. Is it actually considered safe to release null?
Should be.
The framework API doesn't mention it, but I've noticed that both ECM and Fortress have code in their ServiceManager.release() implementations that can handle receiving a null reference.
Yep.
Is this feature more of a safety net, or was there previously a clear decision to allow null to be released?
It was a clear decision. If we require non-null references, then we must throw an exception if the client violates that contract--which also violates the principle that releasing should not have adverse affects. For components that do not need releasing (i.e. singleton components), there is no effect. Same for null references.
--
"They that give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety."
- Benjamin Franklin
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
