public override void Visit(GCMoveEvent ev) { for (int i = 0; i < ev.NewObjectPointers.Count; i++) { if (allocationsTracker.TryGetValue(ev.OldObjectPointers[i], out var allocation)) { allocationsTracker[ev.NewObjectPointers[i]] = allocation; allocationsTracker.Remove(ev.OldObjectPointers[i]); } } }
public override void Visit(GCMoveEvent ev) { for (int i = 0; i < ev.NewObjectPointers.Count; i++) { if (allocationsTracker.TryGetValue(ev.OldObjectPointers[i], out var allocation)) { allocationsTracker[ev.NewObjectPointers[i]] = allocation; allocationsTracker.Remove(ev.OldObjectPointers[i]); } else { Console.WriteLine("Scary stuff, moving something that doesn't exist."); } } }
public virtual void Visit(GCMoveEvent ev) { }