Quote:
Originally Posted by hadeset
Yeah, but at some point, it does it anyways. Well not removing memory, but calling finalizers, which are supposed to do the memory freeing.
|
Finalizers are most definitely NOT supposed to free any memory. Unless perhaps you mean unmanaged memory. In which case you should be using the IDisposable pattern anyways. The garbage collector frees memory, finalizers do not.
Quote:
Originally Posted by Super Aids
You're better off doing it yourself at some points. Not saying it's necessary in this case, but with streams and such it's highly recommended.
|
You should only really use the IDisposable pattern to clean up unmanaged resources - closing handles, connections, etc., which is also why the base class of all streams in .NET, Stream, implements the IDisposable interface.
Quote:
Originally Posted by -impulse-
Deadlocks hardly. Race conditions, not really either. The source I released used one thread per client so they would be fairly rare. Though, a very well known problem would be the collection modified exceptions which is a result of a lack of locks which do exists in most sources.
|