Commit dc412cb
[release/9.0] Root the System.Runtime EventSource (#108348)
* Root the System.Runtime EventSource
The System.Runtime EventSource (RuntimeEventSource), was unintentionally being garbage collected because it wasn't rooted. This caused runtime EventCounters to no longer be available after GC occurred.
This was a regression from a recent change (#106014). That change accidentally converted the static field that was intended to the root the object into a property getter that returned a new instance each time it was called. This fix converts the property back into a statically initialized field.
This will fix #107919 once it is backported.
* PR feedback
---------
Co-authored-by: Noah Falk <noahfalk@microsoft.com>1 parent 3a9f86f commit dc412cb
File tree
1 file changed
+2
-1
lines changed- src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing
1 file changed
+2
-1
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
0 commit comments