mono/monodevelop — pull request #551 by DavidKarlas (2014-05-15 12:15:13+00:00)
Title: [CorDebugger] Pdb locking and DebuggerSession memory leak

This is fixing 99% of pdb locking cases which is also reported here: [Bug 19708](https://bugzilla.xamarin.com/show_bug.cgi?id=19708)

What does 99% means:
* First commit "DebuggerSession memory leak fix so..." is handling releasing of StackFrame objects and ObjectValue objects which have reference to DebuggerSession in MD GUI components like StackPad, ObjectValuePad...
* Second commit "MTA Thread" is part of that 1%... When I ran MemoryProfiler once it happened that one call was stuck inside MTA Thread after debugging was complete... So I implemented this time-out with thread.Abort... I'm open for better solutions...
* Third commit 20sec timeout... I don't like using 1 pool thread for 22sec either... But this collect has to be done after CorDebuggerSession is without references so it has to be delayed abit... 20sec is for 15sec MTA timeout... Also open for better solutions...

Because running under MemoryProfiler is slow I stopped running after few days without pdb lock but after 1 week it happened again(before I had to restart **every hour**(if I was doing some debugging ofc))...
This is why I didn't commit this because I wanted to track down all this leaks...
But yesterday @mhutch noticed some StackFrame leaking so I told him I will commit this today so he don't have to track this leaks down because they are already fixed here...