OpenGL (SDL,C++) tutorial 19 - render 3d text
Loading...
995
views
Loading...
Uploader Comments (thecplusplusguy)
see all
All Comments (6)
-
Id imagine it's a memory leak. Make sure to delete a pointer before you reassign it. Reading the others person's response to you, I'm guessing you have a pointer pointed to a new variable in a loop or something, so it keeps using more memory
That;s just my guess
-
hello, the problem was with texts displaying on the screen,
i didnt use SDL_FreeSurface() after writing something thats the reason :D
-
yeh i did thanks for help ill try fix this
-
Hi.
You have little typo in your program: std::cout << "Nor oepened" << std::endl;
It should be: std::cout << "Not opened" << std::endl;
But thank you very much for new 3 videos, i really enjoy them. You are a good teacher.
Loading...
@thecplusplusguy
hey, my rpg game 2d made in SDL and c++>eats more and more RAM everytime i have it running
it starts at like 6mb and after 1 min its ~60 MB ram used
how should i optimize that game??
devilazpl 4 months ago
@devilazpl
This not really connected to this tutorial.
Probably you use dynamic memory allocation somewhere in the main loop (or one function/member function, which you call)
If you don't use memory allocation with new or malloc (if so fix it), probably one class (like vector or string) could cause it. In that case check the size() of all vector and string, if one of them is continously increasing, check where you add something to it, and fix it. I can't say more without source.
thecplusplusguy 4 months ago