I know the renderer frees memory allocated for its textures when destroyed but is this the case with SDL_DestroyWindow() as well?

  • \$\begingroup\$ Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. \$\endgroup\$
    – Community Bot
    Oct 5, 2021 at 8:54

1 Answer 1


Looking at the source code, while the window does seem to know about the renderer associated with it, there does not seem to be any kind of call to the renderer layer of SDL from the implementation of SDL_DestroyWindow, so you'll need to simply call SDL_DestroyRenderer yourself.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .