I'm confused, I commented these 2 lines out resulting in no memory leaks, and when I added them again it's leaking.
However I can't understand why it's actually leaking?
This is the 2 lines of code one of them or both are leaking :
m_surface = TTF_RenderText_Solid(m_font, m_text.c_str(), m_color_fg);
m_texture = SDL_CreateTextureFromSurface(renderer, m_surface);
And here is the declaration of the 2 variables :
SDL_Surface* m_surface = nullptr;
SDL_Texture* m_texture = nullptr;
SDL_FreeSurface
to free them. \$\endgroup\$