-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
3 - M (<= 1 month)
-
5215
While testing collections of links, I found a difference in behaviour between removing an object and invalidating it. LnkLst/LnkSet hide invalidated links but Lst<Mixed> and Set<Mixed> do not have this capability. If a link in these collections is invalidated it becomes null and the size of the collection is not changed. Furthermore, the stored link is not a true null because operations like find_first(Mixed{}) will return not found.
T link_collection = {object}; T object.invalidate() object.remove() LnkLst {} {} Lst<Mixed> {null} <--* {} LnkSet {} {} Set<Mixed> {null} <--* {} Dictionary<Object> {key:null} {key:null} Dictionary<Mixed> {key:null} {key:null}
I think the easiest thing to do here is to remove the links from these collections instead of storing a link to the invalidated object.