Closed Hoffs closed 1 year ago
This fixes usage of SafeHandle that is being disposed/was disposed in the finalizer to call external function. Passing the SafeHandle wrapped object fails as it is disposed already and SafeHandleAddRef throws an exception while performing interop.
SafeHandleAddRef
See similar SO issue: https://stackoverflow.com/a/47940095
I have been running a program with this fix and have not it crash for over a day, where as previously it would fail after an hour or two.
Thanks @Hoffs looks ok to me
This fixes usage of SafeHandle that is being disposed/was disposed in the finalizer to call external function. Passing the SafeHandle wrapped object fails as it is disposed already and
SafeHandleAddRef
throws an exception while performing interop.See similar SO issue: https://stackoverflow.com/a/47940095
I have been running a program with this fix and have not it crash for over a day, where as previously it would fail after an hour or two.