Hacker News new | ask | show | jobs
by barrkel 2447 days ago
COM is agnostic as to how you do multiple inheritance - it doesn't have the concept. It specifies the QueryInterface protocol, but you don't need to return the same instance for the result of the QI call, just one that uses the same lifetime refcount.

Tear-off interfaces and delegated implementations are things in this world.

1 comments

Meaning that the AddRef/Release counter has to be shared between that group of objects?
Same object, different interfaces.
You can implement the other interfaces using other objects, but they should delegate the ref counting to the root/main object.