Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Clear() only clears crtl and doesn't clear the groups #20

Closed

Description

@rkerno

Clear() is not working as intended. g is a copy of the group, not the group itself. The tests pass because ctrl is cleared, which tricks the test into thinking that clear has worked because the keys can no longer be found. I also noticed that Clear() does not use newEmptyMetadata() so there is an optimisation to cache an empty meta and then just assign it control. The same optimisation could be applied to the groups by creating a zero group and the applying it to each group.

Activity

  1. reltuk commented on Aug 28, 2023

    @reltuk
    Contributor

    @rkerno Thanks for the bug report! I've gone ahead and updated the test and pushed a fix for the Clear() implementation. No optimizations there yet --- I agree that keeping an empty metadata around and using that as the right hand argument in the assignments when we need it would be more efficient. Hopefully I can get back to that soon.

  2. added a commit that references this issue on Sep 22, 2023
    b6b11ac
  3. added a commit that references this issue on Nov 8, 2023
    e0a1027
  4. added a commit that references this issue on May 17, 2024
    c0064a0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions