The first thing to install is that the interfaces have been added to Delphi to support COM. Therefore, many design decisions were driven by the desire to facilitate COM programming.
Links to the interface could be perfectly managed manually. In fact, the original COM in C and C ++ initially included manual control of reference counts with explicit calls to AddRef and Release . When consuming COM objects with C, you still need to manually control the link counts. For C ++, a class like CComPtr usually used these days to enable automatic control of reference counters.
When COM support was added to Delphi, Delphi's main competitor was VB. And in VB, you never had to do manual control of link counters. If Delphi developers did not use automatic counter control, it would be much harder to get VB programmers to leave VB and start using Delphi. So, I assume that this was the driver in Delphi developer solutions. Even if it werenβt, itβs much easier to code the link count automatically than to program it manually. Therefore, even if my assumptions are wrong, the decision made by Delphi designers makes life a lot easier.
So, to answer your specific questions:
Why can't they be manually controlled as a regular object?
They may be. You can implement _AddRef and _Release so that they do not control the lifetime of the object. In particular, it is not necessary to specify links for these methods, and for _Release - Free .
Delphi designers just decided to use reference counting because it was necessary for COM?
Well, it is not needed for COM. As I said above, you can encode COM in C or C ++ (or even in other languages) without automatic reference counting.
Another question you could ask is why Delphi interfaces should IInterface out of IInterface . This is due to their initial goal - the implementation of COM interfaces. In many ways, it would be nice if we had interfaces that were not obtained from IInterface . But that is what it is.