garrynewman / GWEN

Abandoned: GWEN - GUI Without Extravagant Nonsense.
MIT License
429 stars 102 forks source link

Custom font destructor #17

Open Cheaterdev opened 11 years ago

Cheaterdev commented 11 years ago

When using custom font for elements like Label in UnitTest: m_Font.facename = L"Comic Sans MS"; m_Font.size = 25; Gwen::Controls::Label* label = new Gwen::Controls::Label( this ); label->SetText( L"Custom Font (Comic Sans 25)" ); label->SetFont( &m_Font ); label->SizeToContents(); label->SetPos( 10, 170 );

There is no call FreeFont to renderer when m_Font dies. It causes some memory leaks.