Hi!
I've encountered a problem with memory leak in my program
And i checked if this is my fault
The following code allocates about 130 mb
(i saw it in task menager)
b2BodyDef newbody;
for(int i = 0; i < 1000000; i++)
{
gWorld->DestroyBody(gWorld->CreateBody(&newbody));
}
Could you please help me what is wrong with this?
Thank you
I've encountered a problem with memory leak in my program
And i checked if this is my fault
The following code allocates about 130 mb
(i saw it in task menager)
b2BodyDef newbody;
for(int i = 0; i < 1000000; i++)
{
gWorld->DestroyBody(gWorld->CreateBody(&newbody));
}
Could you please help me what is wrong with this?
Thank you