When a file-like object is passed to RWopsFromPython, the file handle should be closed with SDL_RWops.
However, the real file object optimization bypasses this and creates its own SDL_RWops based on the real file object information, so the real file object should be closed as soon as it is passed into RWopsFromPython.
I don't think this is really a handle leak - garbage collection will close the handle when it happens, which is usually pretty fast. That being said, I don't see a reason not to accept this.
When a file-like object is passed to
RWopsFromPython
, the file handle should be closed withSDL_RWops
.However, the real file object optimization bypasses this and creates its own
SDL_RWops
based on the real file object information, so the real file object should be closed as soon as it is passed intoRWopsFromPython
.