P/Invoke signature can be changed to use RocksDbSafeHandle instead of IntPtr. Then you wouldn't need GC.KeepAlive. P/Invoke will marshal SafeHandle for you and handle keeping it alive for duration of call.
P/Invoke signature can be changed to use RocksDbSafeHandle instead of IntPtr. Then you wouldn't need GC.KeepAlive. P/Invoke will marshal SafeHandle for you and handle keeping it alive for duration of call.