SDL - Destroying renderer?

I'm learning SDL, and I don't think I've fully grasped how to destroy a renderer.

What I've been doing
rendername = NULL;

I think I'm missing something though, because when opening multiple windows, each with their own renderer, and close them... the resources utilized in the RAM are not being de-allocated. This leads to a memory leak if you open the window more than once, since it re-allocates more memory when using the
rendername = SLD_CreateRenderer(windowname, -1, SDL_RENDERER_ACCELERATED);


At first I thought this was an issue with the windows being created, but after removing the renderer from the equation the memory issue went away. Edit : this wasn't the issue.

I found out that the render was not being de-allocated by the initial code example shown above, though the pointer does seem to equate to NULL.
Last edited on
Topic archived. No new replies allowed.