Re: A re-announce on GC's defects
- From: "Bruce Wood" <brucewood@xxxxxxxxxx>
- Date: 18 Jan 2007 18:15:13 -0800
Barry Kelly wrote:
Michael D. Ober wrote:
You never have to call the IDispose interface. The GC will do this for you.
You never need to call Dispose. By telling the compiler that an object
class implements IDisposable, the GC will call Dispose for you before it
actually deallocates memory.
Please, educate yourself before you spread more misinformation!
Sorry, Barry, but could you provide some references? I believe your
description of how finalizers / IDisposable interact, but I too have
read (somewhere) on MSDN that the _ideal_ is to write your classes so
that if the caller forgets to Dispose your objects, it will be taken
care of in garbage collection, later.
I realize that it's possible to write classes that don't act that way;
I'm talking about "best practices" here.
I'm fully open to being corrected. This is a vague memory of "something
I read," nothing more.
.
- Follow-Ups:
- Re: A re-announce on GC's defects
- From: Michael D. Ober
- Re: A re-announce on GC's defects
- From: Barry Kelly
- Re: A re-announce on GC's defects
- From: Barry Kelly
- Re: A re-announce on GC's defects
- References:
- A re-announce on GC's defects
- From: Born
- Re: A re-announce on GC's defects
- From: Andre Kaufmann
- Re: A re-announce on GC's defects
- From: Michael D. Ober
- Re: A re-announce on GC's defects
- From: Barry Kelly
- A re-announce on GC's defects
- Prev by Date: Re: XML Document Serialization
- Next by Date: C # and C ++ learning curve
- Previous by thread: Re: A re-announce on GC's defects
- Next by thread: Re: A re-announce on GC's defects
- Index(es):
Loading