TDPL: Manual invocation of destructor

Max Samukha spambox at d-coding.com
Tue Aug 10 07:38:00 PDT 2010


On 08/10/2010 01:09 AM, Lutger wrote:
>
> http://www.codeproject.com/KB/dotnet/idisposable.aspx
>
> Especially these:
> - Finalizers are called if constructors throw an exception
> - Microsoft recommends that every type implementing IDisposable will check in
> every method and property accessor to see if it has been disposed, and throw an
> exception if it has

Nice reading! I was aware of some IDisposable gotchas but there are a 
few more. For example, who would know that 
GC.KeepAlive/GC.SuppressFinalize are not required in most cases?



More information about the Digitalmars-d mailing list