
Font disposing
Posted Wednesday, 19 March, 2008 - 11:32 by haymo inWhen do I have to dispose TextureFont objects? I'm using it as a member of my own wrapper class and thought, I should dispose the existing object, before replacing them with a new one. But it appears, a fresh created TextureFont cannot get disposed?
OpenTK.Graphics.TextureFont testfont = new TextureFont(new Font("Arial",10.0f)); testfont.Dispose(); //throws NullReferenceException
I think, its because no texture has been attached to the font, right? But how can I tell from outside?
this is not the current svn, maybe this has already been fixed?


Comments
Re: Font disposing
Yes, it seems we are trying to delete texture #0 in this case - but this shouldn't crash with an NRE. I'll take a look tonight.