ARTICLE AD BOX
When running LINQ queries such as Where, Except, Intersect, Union, and FirstOrDefault on a List, the memory profiler shows an instance of ObjectEqualityComparer being retained and observed as a memory leak in the profiler.
Without these LINQ operations, the ObjectEqualityComparer is not retained.
It is unclear whether this is expected behavior or not. I am filing this issue to request clarification on the following:
A) Is this expected behavior?
B) If it is expected behavior, should this be treated as "not an issue"?
C) If it is not expected behavior, please provide guidance on how to resolve or avoid this memory leak?
Profiler Result: Running the LINQ Queries
profiler image after running the LINQ queries and before calling dispose
Profiler Result: After Disposing the List
profiler image after running the LINQ queries and calling dispose
Path to roots
