Interfaces are great, but they can be a pain to debug. Forgetting one weak link can lead to Access Violation hell. I seem to remember a utility that would let you visualise the links between interfaced objects, but can't remember what it was called. Anybody know?

Interfaces are great, but they can be a pain to debug. Forgetting one weak link can lead to Access Violation hell. I seem to remember a utility that would let you visualise the links between interfaced objects, but can't remember what it was called. Anybody know?

Do you have any clever interface debugging tips or tricks?

Comments

  1. There is this: https://github.com/AquaSoftGmbH/RefCountTracer
    It helps you find memoryleaks, but also could show you if a refcount goes below 0.

    ReplyDelete
  2. Refactor them away :-)
    When the mix of interface reference counting and TObject gets so complex, that the source code is no longer obvious, maintenance costs sometimes become too high and another solution might be better.

    ReplyDelete
  3. Lars Dybdahl Totally agree and it is even worse when reference counting is disabled (like adding an interface reference to an UI component).

    ReplyDelete
  4. Paul Thornton and Steffen Binas  thanks (:

    ReplyDelete

Post a Comment