Sign in to follow this  
Decrius

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

Recommended Posts

Decrius    100
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 this post


Link to post
Share on other sites
DMINATOR    240
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 this post


Link to post
Share on other sites
Decrius    100
Quote:
Original post by DMINATOR
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


Ah thanks, yes I was using the Task Manager.

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this