Close vs. Dispose

  • Thread starter Thread starter Nathan
  • Start date Start date
Nathan,

Why you try to compare different things,

Living has a connection with swimming, but it is very difficult to tell the
difference.

Close and dispose have one equality, they both are at the end of something.

Cor
 
Cor said:
Nathan,

Why you try to compare different things,

Living has a connection with swimming, but it is very difficult to tell the
difference.

Close and dispose have one equality, they both are at the end of something.

Perhaps more classes should have multiple "cleanup" methods. Files
could have a Close which does the expected thing and also a Dispose
which "kills" the file without first flushing any output buffer. =O
Of course, the finalizers should follow the current "best practice"
du jour from the C# groups and always throw an exception in order
to crash the application, to teach the programmer what "automatic
garbage collection" is /really/ all about...

Feh.
 
Back
Top