This content has been marked as final. Show 2 replies
No idea if this will help or not, but I've seen issues like this when running console applications where Main() is decorated with [STAThread]. The simplest solution is to change it to [MTAThread]. The problem is related to the garbage collector not actually getting to dispose of things properly. Some more info here: http://support.microsoft.com/kb/828988
If you're talking about a Forms application or something like that, this advise doesn't apply.
Thanks for your reply. It is a console application and I am already using 'MTAThread' instead of 'STAThread'. Sorry, I haven't mentioned.