Fix font memory leak (#17092)

This commit is contained in:
cx384
2026-04-10 18:39:12 +02:00
committed by GitHub
parent 9b4e59cd42
commit 3dc5fb3e02
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -416,7 +416,7 @@ bool CGUITTFont::load(SGUITTFace *face, const u32 size, const bool antialias,
update_load_flags();
// Store our face.
face->grab();
m_face.grab(face);
tt_face = face->face;
// Store font metrics.
+1
View File
@@ -256,6 +256,7 @@ namespace gui
core::vector2di getKerning(const char32_t thisLetter, const char32_t previousLetter) const;
video::IVideoDriver* Driver = nullptr;
irr_ptr<SGUITTFace> m_face;
FT_Face tt_face;
FT_Size_Metrics font_metrics;
FT_Int32 load_flags;