Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.8.0
-
None
-
-
2ea099b67 (dev), 247cd80ab (dev), 6dfe5c847 (6.8), 7bf79ee39 (6.8)
Description
Running a loop like the following:
for (int j = 0; j < 100; ++j) { for (int i = 0; i < QFontDatabase::families().size(); ++i) { QFontInfo fi(QFont(QFontDatabase::families().at(i))); qDebug() << fi.family(); } QFontDatabase::addApplicationFont(":/fooBar.ttf"); QFontDatabase::removeAllApplicationFonts(); }
will lead to the application consuming 2GB of memory. The code to add and remove the application font is just to force an invalidate() call on the database so that it's repopulated. Calling the private API directly exhibits the same bug, so it's not caused by the application font loading.
Running with "-platform windows:fontengine=gdi" works around the bug.
Attachments
Issue Links
- resulted in
-
QTBUG-129933 Memory usage higher with DirectWrite font database
- Reported
For Gerrit Dashboard: QTBUG-129849 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
596938,3 | Windows: Fix memory leak in DirectWrite font database | dev | qt/qtbase | Status: MERGED | +2 | 0 |
596939,4 | Windows: Release old references when invalidating DirectWrite db | dev | qt/qtbase | Status: MERGED | +2 | 0 |
596989,2 | Windows: Fix memory leak in DirectWrite font database | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
596990,2 | Windows: Release old references when invalidating DirectWrite db | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |