Skip to content

Remove unnecessary allocations in NUnitEqualityComparer #4075

Description

@manfred-brands

The NUnitEqualityComparer on every instantiation creates a list if IChainComparer instances.
The only reason these are instances is because the constructor passes in the current instance of NUnitEqualityComparer
Refactor to static methods where this is passed as an extra argument to the Equal method instead.

This should reduce pressure on the garbage collector.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions