doc, wifi: (fixes #1158) Reintroduce WifiPpdu's destructor due to PIMPL
Also add reference explaining why declaring a default destructor in the header is a problem
This commit is contained in:
@@ -1512,6 +1512,16 @@ for more details.
|
||||
|
||||
- Avoid declaring trivial destructors, to optimize performance.
|
||||
|
||||
.. _When an empty destructor is required: https://andreasfertig.com/blog/2023/12/when-an-empty-destructor-is-required/
|
||||
|
||||
- When declaring default destructors with ``~Class() = default;``, be aware
|
||||
that classes derived from ``SimpleRefCount<T>`` must have this declaration
|
||||
on the source file (``.cc``). The header file (``.h``) should contain
|
||||
the plain destructor declaration ``~Class();``. This is due to PIMPL's
|
||||
opaque pointer, as explained in Andrea Fertig's blog post
|
||||
`When an empty destructor is required`_.
|
||||
See class WifiPpdu's destructor for an example.
|
||||
|
||||
C++ standard
|
||||
============
|
||||
|
||||
|
||||
Reference in New Issue
Block a user