• 14
• 12
• 9
• 10
• 13

# [SDL] + OpenGL gives me memory grow of 4kB per 2 seconds

This topic is 3652 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, I've been using SDL + OpenGL lately, and found out that my application's memory kept growing. I out-commented code to see where it leaks memory, and when I use the following code, the application's memory is growing 4kB per 2 seconds spproximatly:
bool running = true;
while (running)
{
glClear(GL_COLOR_BUFFER_BIT);
SDL_GL_SwapBuffers();
}

I also do some event processing, but I figured that worked fine...apparently one of the 2 functions is leaking... Anyone with the same problem? What could it be? Thanks in advance, Decrius

##### Share on other sites
How did you check the memory ? Did you use Task Manager for that ?
In that case you don't have to worry it is normal behaviour for any windows application.

If you want to check if memory leaks are really occuring then you need to use
crtdbg.h

##### Share on other sites
Quote:
 Original post by DMINATORHow did you check the memory ? Did you use Task Manager for that ? In that case you don't have to worry it is normal behaviour for any windows application.If you want to check if memory leaks are really occuring then you need to use crtdbg.h

Ah thanks, yes I was using the Task Manager.

Can I get crtdbg.h to work with MingW and Code::Blocks?