-
Kirill Smelkov authored
Experience shows that we cannot provide reliably working weak references support without crashing GC because there needs to be a coordination in between object resurrection and at least GC mark phase[1,2] with [3] and [4] showing an idea what kind it coordination it needs to be. And since support for weak references is upcoming in standard library with hopefully Go 1.24 [5], it does not make sense to continue pushing hard to make weak references work on our standalone side. By disabling support for custom weak references we will avoid crashes, but will start to leak unused objects in zodb.Connection live cache. This should be relatively ok for now as WCFS in wendelin.core is currently the only known ZODB/go user and it cares to drop ZBlk* state after loading the data. The leak, thus, should be modest with, hopefully, not creating problems in practice. And once std package weak is out there we will switch to that restoring automatic LiveCache cleanup. [1] https://github.com/golang/go/issues/41303 [2] wendelin.core@9b44fc23 [3] https://github.com/golang/go/commit/dfc86e922cd0 [4] https://github.com/golang/go/commit/79fd633632cd [5] https://github.com/golang/go/issues/67552 /reviewed-by @levin.zimmermann /reviewed-on !11
ee23551d