Skip to content

Remove unnecessary allocations in NUnitEqualityComparer #4075

Closed
@manfred-brands

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions