G
Guest
Any chance 2.0 will help with this?
Finalization for .NET really needs the ability to support leaving some
functionality intact until the program actually terminates. There should be
support of exceptions for things like Console.WriteLine to continue working
in a finalizer or outputting to a specific file for example for logging
purposes.
Good program practices typically involve adding code to verify that
everthing got shutdown in an orderly fashion and sometimes the only easy way
to do that withouth completely redesigning a system is to try to handle it in
a more deterministic destruction sort of way (i.e. finalizers). Yes you
could argue if you designed everything to call everything else to dispose all
of your objects on shutdown then you wouldn't need this... the reality is I
haven't seen a .NET project yet that implemented an orderly shutdown of that
nature. So having to CLR features to help with this real world issue, would
help existing and future code. Or a better more deterministic shitdown
process that we can order certain things to shutdown last (Like for example a
singleton file logger class for logging output messages- I really don't want
that finalized until I am done with everything so I can use it for error
diagnostic output).
Finalization for .NET really needs the ability to support leaving some
functionality intact until the program actually terminates. There should be
support of exceptions for things like Console.WriteLine to continue working
in a finalizer or outputting to a specific file for example for logging
purposes.
Good program practices typically involve adding code to verify that
everthing got shutdown in an orderly fashion and sometimes the only easy way
to do that withouth completely redesigning a system is to try to handle it in
a more deterministic destruction sort of way (i.e. finalizers). Yes you
could argue if you designed everything to call everything else to dispose all
of your objects on shutdown then you wouldn't need this... the reality is I
haven't seen a .NET project yet that implemented an orderly shutdown of that
nature. So having to CLR features to help with this real world issue, would
help existing and future code. Or a better more deterministic shitdown
process that we can order certain things to shutdown last (Like for example a
singleton file logger class for logging output messages- I really don't want
that finalized until I am done with everything so I can use it for error
diagnostic output).