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

many to many - Django Rest Framework ManyToMany filter multiple values -

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

Java Entity Manager - JSON reader was expecting a value but found 'db' -