This repository was archived by the owner on Jun 10, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 190
This repository was archived by the owner on Jun 10, 2026. It is now read-only.
CancelKeyPress event handler should be allocated before TraceEventSession resource acquisition #44
Open
Description
There is a small chance that System.Environment.Exit can be called prior to the event handler being wired up. In this scenario, despite the huge amount of gracious and fantastic warnings about the importance of wiring up this event, the EventTraceSession will hang around after the program has exited. (Thank you to whoever spent the time to write up this fantastic example, by the way - it definitely pointed me in the right direction.)
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.