c++ : Deleting object (not just its pointer) from vector
Are you sure the int-to-string conversion is the problem, and not your text rendering itself?
I'm not sure, you might be right.
maybe it creates another surface every frame, I'll look into that now
EDIT:
Yeah, that was it
calling SDL_FreeSurface( red_orb_counter_surf ); afterwards solves it.
Thank you!
maybe it creates another surface every frame, I'll look into that now
EDIT:
Yeah, that was it
calling SDL_FreeSurface( red_orb_counter_surf ); afterwards solves it.
Thank you!
You always need to read the documentation to make sure you aren't causing memory leaks when using API functions. Functions with "create" in their name typically allocate memory, and functions with "get" sometimes increment reference counts. The documentation will tell you if you need to call the corresponding "free" or "release" functions.
You always need to read the documentation to make sure you aren't causing memory leaks when using API functions. Functions with "create" in their name typically allocate memory, and functions with "get" sometimes increment reference counts. The documentation will tell you if you need to call the corresponding "free" or "release" functions.
Yes, you are right, I ran into this whole thing a bit hastily, I was too excited
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement