HeapListener gets inbound and outbound references and detects cyclic references.