Closed geohuz closed 1 year ago
There is a client setting, recordDiscardTimeout, this gives a buffer time before actually discarding the record. If you wait five seconds, the default value, you'll see the entry-added event is no longer triggered. And if you set the recordDiscardTimeout to 0 you'll see its instant.
After issuing
list.discard()
I can still getentry-added
entry-removed
event triggered. Only after addinglist.callbacks.clear()
stop the event. Further more, if examine the list, I can still find entries inlist.record
, I'm not sure if there is a problem, In a scenario which I need to dispose the current list and record listeners and subscribers and do a reload with another list, doesrecord.discard
andlist.discard
ensure the GC will not cause memory leaks?