Skip to content

Implement IterableWeakSet IterableWeakMap classes  #9

@bogeeee

Description

@bogeeee

Needed to properly clean up callbacks on connection but not cause a memory leak by all the on-socketconnection-close handlers itsself: The ClientCallbacks / ClientCallbacksForEntites should be allowed to be forgotten. Also ClientCallbacksForEntities's keys

These classes can be like the ones in the not-so-weak package, but these have the flaws that they

  • don't work, becaues they call registry.register with WeakRef objects as values and unregisterTokens. But both work only with normal objects and fail silently otherwise (=don't fire) - have tested this !
  • Their type parameters are faulty and also their iterator's types don't match those of the base class - maintainer not willing to fix that.

So that cries for a reimplementation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions