[Development] QtMultimedia BIC / header cleanliness issue

Thiago Macieira thiago.macieira at intel.com
Sun Dec 23 06:13:05 CET 2012


On domingo, 23 de dezembro de 2012 11.50.18, Sze Howe Koh wrote:
> For consistency with the other interfaces, I suggest simply adding
> empty virtual destructors. I believe this won't break any existing
> code; the only code that should be affected is deletion via pointers
> to QMediaServiceProviderFactoryInterface/QAudioSystemFactoryInterface.
> But in this case, our change would probably fix memory leaks for
> programs which use such code.

Adding a new virtual implies changing the layout of the virtual table. If we 
append the virtual, the order of the existing virtuals should not change, so 
the calls should still make through.

Since the virtual destructor is missing, one can assume that objects of those 
classes are never deleted through those specific classes anyway. Moreover, it 
seems that those classes are often used in multiple inheritance and are not in 
the primary inheritance path. That means the addition of virtuals will not 
change the primary virtual table.

So the question is: is the binary-incompatible change acceptable?

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20121222/3a895acd/attachment.sig>


More information about the Development mailing list