Close vs. Dispose

C

Cor

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
 
J

Joe \Nuke Me Xemu\ Foster

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top