CreateTextLayout causes Memory Leak
MightyM7 opened this issue · comments
MightyM7 commented
Hi,
the function CreateTextLayout in Text.cpp causes a memory leak by not releasing the textFormat in case of returning the textLayout (line 87).
Old:
if (SUCCEEDED(hr) && textLayout != NULL) { return (HANDLE)textLayout; }
Correct:
if (SUCCEEDED(hr) && textLayout != NULL) { SafeRelease(&textFormat); return (HANDLE)textLayout; }
Regards
Jingwood commented
Thanks!