Optimization in KDE-PIM
Save memory by sharing data object of empty KABC::Picture objects
Optimize memory consumption of KABC library for large address books.
In many cases no picture will be set for a contact yet still
Picture::Private was allocated. On my 64bit machine it has a size of
A common practice is to share the data member for empty objects, as is
done in most Qt classes (QString e.g.). This then saves the
Picture::Private allocation for all contacts which do not have any
Implementation detail: Sadly one cannot make it work with a private
Private class as that would not be accessible by the Q_GLOBAL_STATIC
helper. Renaming the private data class should not have any affect
on the ABI though.