WeakTable with java gc problem #96
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
WeakTable uses java.lang.ref.WeakReference to reference key and value, when java gc occurs, WeakReference data will be released, causing lua data loss.
example code:
After java gc the WeakSlot key and value will be null. and LuaTable rehash will throw NPE when calc key hash
Is this normal?
Fixed