This repository has been archived by the owner on Feb 12, 2023. It is now read-only.
Provide a Virtual Method Anchor for Classes in Headers #6036
Labels
C-bug
The issue contains a bug report
D-easy
We estimate that the issue is easy to fix
Good first issue
This is a good issue to get started working on qTox
M-architecture
Category for internal architecture problems
If a class is defined in a header file and has a vtable (either it has virtual methods or it derives from classes with virtual methods), it must always have at least one out-of-line virtual method in the class. Without this, the compiler will copy the vtable and RTTI into every .o file that #includes the header, bloating .o file sizes and increasing link times.
Source: http://llvm.org/docs/CodingStandards.html#provide-a-virtual-method-anchor-for-classes-in-headers
In most cases, this is just a matter of adding an explicitly defined destructor and defining it in the .cpp file.
The text was updated successfully, but these errors were encountered: