System Timers Question

08/20/2013 01:08 Smaehtin#16
Quote:
Originally Posted by hadeset View Post
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 View Post
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- View Post
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.
:facepalm:
08/20/2013 12:29 -impulse-#17
Quote:
Originally Posted by Super Aids View Post
One thread per client is exactly when it happens and @ the collections [Only registered and activated users can see links. Click Here To Register...]
Read my post again. I didn't give that source a rating, but obviously it would be poorly written. At that time I had no idea how a thread pool would work nor anything about deadlocks or race conditions.

Quote:
Originally Posted by Smaehtin View Post
:facepalm:
I totally agree with you. Good thing we have programming gods like you... unlike you I am a mere mortal.