SQLitePCL.raw icon indicating copy to clipboard operation
SQLitePCL.raw copied to clipboard

Remove hook_handle.ForDispose ?

Open ericsink opened this issue 4 years ago • 1 comments

@sebastienros That's a separate issue. hook_handle.ForDispose() prevents instances created to represent null from getting disposed. The solution is to delete hook_handle.ForDispose() since it's unnecessary (disposing of a null/invalid SafeHandle is not only fine; it's expected).

Originally posted by @sharwell in https://github.com/ericsink/SQLitePCL.raw/issues/398#issuecomment-787583885

ericsink avatar Mar 01 '21 16:03 ericsink

Adding rationale: A trace shows that some hook_handle instances are not disposed correctly and induce a Finalize() call from the GC.

sebastienros avatar Mar 01 '21 18:03 sebastienros