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.
The
NUnitEqualityCompareron every instantiation creates a list ifIChainComparerinstances.The only reason these are instances is because the constructor passes in the current instance of
NUnitEqualityComparerRefactor to static methods where
thisis passed as an extra argument to theEqualmethod instead.This should reduce pressure on the garbage collector.