Fix IDAllocator not being utilized properly in dynamic synchable group
This commit is contained in:
parent
30fb67f63a
commit
2f03d6730a
@ -269,6 +269,7 @@ class DynamicSynchableGroup<T : ISynchable>(
|
|||||||
if (value2slot.isNotEmpty()) {
|
if (value2slot.isNotEmpty()) {
|
||||||
value2slot.clear()
|
value2slot.clear()
|
||||||
id2slot.clear()
|
id2slot.clear()
|
||||||
|
idAllocator.reset()
|
||||||
|
|
||||||
remoteStates.toTypedArray().forEach { it.clear() }
|
remoteStates.toTypedArray().forEach { it.clear() }
|
||||||
}
|
}
|
||||||
@ -319,6 +320,7 @@ class DynamicSynchableGroup<T : ISynchable>(
|
|||||||
val slot = value2slot.remove(element)!!
|
val slot = value2slot.remove(element)!!
|
||||||
checkNotNull(id2slot.remove(slot.id))
|
checkNotNull(id2slot.remove(slot.id))
|
||||||
remoteStates.forEach { it.remove(slot) }
|
remoteStates.forEach { it.remove(slot) }
|
||||||
|
idAllocator.release(slot.id)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user