Skip to content

Fix inconsistencies between construction, copy construction and reference counting of GenericAddress (IOpaqueAddress)

The following discussion from !1166 (merged) should be addressed:

  • @clemenci started a discussion:

    This is strictly backward compatible, as it makes explicit what was done implicitly by the compiler, but I do not think it is correct, as the copy constructor is not copying all members.

    OTOH I'm not convinced that the copy constructor is correct either: it leaves the reference count at 0, which is not correct... and it's not correct in the normal constructor, as calling release() on a newly constructed GenericAddress does not delete the instance as it should (unless addRef() is magically called).

    To summarize, this change is fair, but the starting point is wrong, so I'll merge (after testing in LHCb) and I'll create an issue to address the inconsistencies.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information