On 3/30/2020 12:25 PM, Johan wrote: > Clang has had this for a decade Do you mean RAII? RAII is only a partial solution. For example, it is quite easy for an RAII object to leak a reference to its internals, and then the RAII object gets deleted, but the reference is still there.