Fixed a graphics memory leak in the text renderer