gojs: gc fix refcount issue (#845)
Signed-off-by: Robbert van Ginkel <570934+robbertvanginkel@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
483dfe17c3
commit
ac5ec317a7
@@ -195,6 +195,10 @@ func (j *values) increment(v interface{}) uint32 {
|
||||
}
|
||||
|
||||
func (j *values) decrement(id uint32) {
|
||||
// Special IDs are not refcounted.
|
||||
if id < nextID {
|
||||
return
|
||||
}
|
||||
id -= nextID
|
||||
j.goRefCounts[id]--
|
||||
if j.goRefCounts[id] == 0 {
|
||||
|
||||
Reference in New Issue
Block a user