Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 7e20575

Browse files
Clear the Minikin layout cache during engine destruction (#21473)
1 parent 83e1814 commit 7e20575

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

third_party/txt/src/txt/font_collection.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "flutter/fml/logging.h"
2828
#include "flutter/fml/trace_event.h"
2929
#include "font_skia.h"
30+
#include "minikin/Layout.h"
3031
#include "txt/platform.h"
3132
#include "txt/text_style.h"
3233

@@ -82,7 +83,9 @@ class TxtFallbackFontProvider
8283

8384
FontCollection::FontCollection() : enable_font_fallback_(true) {}
8485

85-
FontCollection::~FontCollection() = default;
86+
FontCollection::~FontCollection() {
87+
minikin::Layout::purgeCaches();
88+
}
8689

8790
size_t FontCollection::GetFontManagersCount() const {
8891
return GetFontManagerOrder().size();

0 commit comments

Comments
 (0)