File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 1- # Copyright 2019-2021 ObjectBox Ltd. All rights reserved.
1+ # Copyright 2019-2023 ObjectBox Ltd. All rights reserved.
22#
33# Licensed under the Apache License, Version 2.0 (the "License");
44# you may not use this file except in compliance with the License.
@@ -21,8 +21,6 @@ class ObjectBox:
2121 def __init__ (self , c_store : OBX_store_p ):
2222 self ._c_store = c_store
2323
24- self ._closed = False
25-
2624 def __del__ (self ):
2725 self .close ()
2826
@@ -33,7 +31,7 @@ def write_tx(self):
3331 return objectbox .transaction .write (self )
3432
3533 def close (self ):
36- if not self ._closed :
37- obx_store_close ( self . _c_store )
38- self ._closed = True
39-
34+ c_store_to_close = self ._c_store
35+ if c_store_to_close :
36+ self ._c_store = None
37+ obx_store_close ( c_store_to_close )
You can’t perform that action at this time.
0 commit comments