Leak detection: working with paths
YourKit Profiler for .NET provides a unique and very powerful way to detect memory leak -
calculation of paths between objects in memory.
A path is a very simple and intuitive concept. A path between Object 1 and Object n
is a sequence of objects where:
- First element is Object 1
- Each element in the sequence, starting with the second one, is referenced from its predecessor
- Last element is Object n
Select an object and use Memory | Paths from GC Roots... (Ctrl+P)
to find out why that object is retained in memory. This action is needed when you
have found a leaked object and want to fix the memory leak.
You can limit the number of paths to find. It is guaranteed that the shortest paths are found first, i.e. there are no paths shorter than the ones displayed.
