Can a ThreadStatic IDisposable be automatically disposed?
问题 This is not a question of how to automatically call dispose - my problem is the opposite: I have a thread pool where each thread has a ThreadStatic Graphics (which was created from an Image) to perform text size measuring. Now I've ran into the problem that from time to time the graphics seems to be disposed as even reading the TextRenderingHint property fails(causes an ArgumentException). Is there some mechanism which disposes the Graphics e.g. if the thread is idle for a long period? 回答1: