Michael Hinkel
2006-02-24 11:03:31 UTC
All,
I'd like to log some information in a
protected virtual void Dispose(bool disposing)
method which can be called either by Dispose() or by the finalizer
(implemented according to Microsoft's proposal "Implementing a Dispose
Method"; see
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpguide/html/cpconimpleme
ntingdisposemethod.htm).
If Dispose(bool disposing) is called by Dispose() everything works fine,
but if the method is calld by the finalizer on application shutdown, no
log entry is created. If I use a Console.WriteLine(message) the message
is sent to the Console even on application shutdown.
Any suggestions?
Michael
_______________________________________
DATATRAK Deutschland GmbH
Michael Hinkel
Software Developer
Rochusstrasse 65
53123 Bonn
http://www.datatrak.net
I'd like to log some information in a
protected virtual void Dispose(bool disposing)
method which can be called either by Dispose() or by the finalizer
(implemented according to Microsoft's proposal "Implementing a Dispose
Method"; see
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpguide/html/cpconimpleme
ntingdisposemethod.htm).
If Dispose(bool disposing) is called by Dispose() everything works fine,
but if the method is calld by the finalizer on application shutdown, no
log entry is created. If I use a Console.WriteLine(message) the message
is sent to the Console even on application shutdown.
Any suggestions?
Michael
_______________________________________
DATATRAK Deutschland GmbH
Michael Hinkel
Software Developer
Rochusstrasse 65
53123 Bonn
http://www.datatrak.net