Closed
Description
While investigating our test suite's memory usage, NUnit also came up from some paths where a lot of parsed data was processed through loop that checked against LessThanOrEqualConstraint. If you look how all ComparisonConstraint inheritors are implemented, they all allocate Description when constructed even though I would presume it's not needed unless assertion fails?
I would suggest that these would be either lazy evaluated or evaluated every time the getter is called, like for example in EqualConstraint:
nunit/src/NUnitFramework/framework/Constraints/EqualConstraint.cs
Lines 399 to 421 in 6f806c6