c# - How to handle SEH exception in the SafeFileHandle finalizer? -


i see on environments, safefilehandle's finalizer throw sehexception because finalizer trying close closed handle.

the issue sehexception must thrown if debugger connected. in other cases, should nothing closehandle api.

but without debuggers on clean envs (no antiviruses, vs or that), observing such problem. looks .net or windows bug.

i see 1 solution - write custom safefilehandle handle sehexception in dispose. need refactor huge project , replace safefilehandles.

is there way unhandledexception handler swallow exception or abort thread causing (gc finilizer thread)? ideas?


Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -