HeavenWu / slimdx

Automatically exported from code.google.com/p/slimdx
MIT License
0 stars 0 forks source link

Memory leaks problem with Mesh.CreateText #685

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I've found that currently Mesh.CreateText consumes memory which is not released 
then. The following example crashes with the exception:

SlimDX.Direct3D9.Direct3D9Exception
E_OUTOFMEMORY: Ran out of memory (-2147024882).

private void button1_Click(object sender, EventArgs e)
{
  const int fontSize = 20;
  const string fontName = "Times New Roman";
  const string text = "Hello World";
  const float deviation = 0.00001f;
  const float extrusion = 0.001f;

  while(true)
  {
    Font font = new Font(fontName, fontSize);
    Mesh mesh = Mesh.CreateText(device, font, text, deviation, extrusion);
                mesh.Dispose();
                font.Dispose();
  }
}

Original issue reported on code.google.com by mzhiloch...@gmail.com on 9 Jun 2010 at 8:07

GoogleCodeExporter commented 8 years ago
Not a SlimDX bug.

Original comment by josh.petrie on 15 Jun 2010 at 7:23

GoogleCodeExporter commented 8 years ago
But where it comes from? Is it a problem inside DirectX or?
What are possible reasons?

Original comment by mzhiloch...@gmail.com on 16 Jun 2010 at 9:01

GoogleCodeExporter commented 8 years ago
Try asking here:
http://www.gamedev.net/community/forums/forum.asp?forum_id=10

Original comment by tom.gran...@gmail.com on 16 Jun 2010 at 5:36