[Mono-bugs] [Bug 430477] Debug.Assert() does not work in winform apps

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Sep 30 16:14:28 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=430477

User jpryor at novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=430477#c9





--- Comment #9 from Jonathan Pryor <jpryor at novell.com>  2008-09-30 14:14:27 MDT ---
I thought [ThreadStatic] worked for instance fields, but apparently I was
wrong:

"A static (Shared in Visual Basic) field marked with ThreadStaticAttribute is
not shared between threads."
  -
http://msdn.microsoft.com/en-us/library/system.threadstaticattribute(VS.71).aspx

At the same time, TraceListener indentLevel/etc. shouldn't be static, as MSDN
defines them as instance properties (and a static field backing an instance
property would be ~silly).

I should fix that at some point...

As for Thread.CurrentThread.Abort() vs. Environment.Exit(), I think the former
is more correct, as it will give any finally blocks a chance to execute, thus
"properly" freeing any unmanaged resources that Environment.Exit() may skip
(e.g. Database handles, shared memory handles, etc.).


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list