From ca514b2384a494b31158408c8820a44753985363 Mon Sep 17 00:00:00 2001 From: Ilya Miheev Date: Wed, 12 Jun 2024 12:52:37 +0400 Subject: [PATCH] no longer takes pointer from env val --- mdbx/txn.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/mdbx/txn.go b/mdbx/txn.go index beeccbe..92b27b8 100644 --- a/mdbx/txn.go +++ b/mdbx/txn.go @@ -93,14 +93,12 @@ func beginTxn(env *Env, parent *Txn, flags uint) (*Txn, error) { // In a write Txn we can use the shared, C-allocated key and value // allocated by env, and freed when it is closed. txn.key = env.ckey - txn.val = *env.cval } else { // It is not easy to share C.MDBX_val values in this scenario unless // there is a synchronized pool involved, which will increase // overhead. Further, allocating these values with C will add // overhead both here and when the values are freed. txn.key = new(C.MDBX_val) - txn.val = C.MDBX_val{} } } else { // Because parent Txn objects cannot be used while a sub-Txn is active