Memory Leak - solved - or 'When STAThread Goes Bad' (English)

Memory Leak - solved - or 'When STAThread Goes Bad'

Monday, 17 November 2003

//

Less than a minute

Memory Leak - solved - or 'When STAThread Goes Bad'

posted on 11:40 PM

I posted a little while ago about an odd 'Memory Leak' I was having...well, after several days of trawling (and annoying Data Wantawho's excellent email component I was mistakenly blaming - sorry!), I finally found the answer! Turns out that the little [STAThread] attribute above the main class of the Comand Line app isn't so inoccuous after all - Dave pointed out this thread - apparently there's some sort of bug in .NET which can lead to what is effectively a leak when using multi-threading in a STAThreaded application!

logo

© 2025 Scott Galloway — Unlicense — All content and source code on this site is free to use, copy, modify, and sell.