It seems all implementations of GR_Graphics::findFont do create a new font
object and hands over the responsibility of that object to the caller.
Obviously that function is also extremely badly named and should probably be
globally renamed to createFont, but that's another story.

In the constructor of FV_View we find:

 const char* pszFamily = m_pG->findFont("Times New Roman", "normal", "",
"normal", "", "12pt")->getFamily();

Now that's nice, isn't it. Creating a new font object and just letting it
lie in the heap, collecting dust and bit-rot. Perhaps someone would like to
adopt that font, or maybe even put it to sleep? No friends, no parents, no
owners. I think it would be an act of mercy to terminate its life.

/Mike

Reply via email to