Open omajid opened 2 weeks ago
https://github.com/dotnet/runtime/blob/9317db0695918f74d8e2308bbe4c2f06cc3dea49/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/EventLog.cs#L651-L664
In the two conditions, we save the just-created log object. Should we call log.Dispose() if neither of those branches are taken?
log
log.Dispose()
Tagging subscribers to this area: @dotnet/area-system-diagnostics-eventlog See info in area-owners.md if you want to be subscribed.
https://github.com/dotnet/runtime/blob/9317db0695918f74d8e2308bbe4c2f06cc3dea49/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/EventLog.cs#L651-L664
In the two conditions, we save the just-created
log
object. Should we calllog.Dispose()
if neither of those branches are taken?