Jump to content
  • Advertisement
Sign in to follow this  
Decrius

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

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

If you intended to correct an error in the post then please contact us.

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


Link to post
Share on other sites
Advertisement
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
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!