BUG #16744: Resources are not removed for a renderer removed from the window.
A loop where the render window is kept around and everything in the pipeline is removed and added at the next iteration leaks memory, in OpenGL, linux. For the OpenGL2 backend same loop does not leak. The previous commit with the same name did not fix the issue.