The type of the held objects.
The type of the held objects.
The object to look for, compared by identity.
Whether the object is present and has not been garbage-collected.
The object to remove, compared by identity.
Whether a matching object was found and removed.
Drop the bookkeeping left behind by objects that have been garbage-collected. Only frees the set's own references — collected objects are already absent from iteration and size without it.
A new array of the live objects, in insertion order.
Called once per live object.
OptionalthisArg: any
Value to bind as this inside the callback.
GradumWeakSet
Description
A set that holds its members weakly, so membership never keeps an object alive. Unlike a native WeakSet, it is iterable and reports its size — collected objects simply disappear from both. Useful for tracking DOM nodes without leaking them once they are removed.