UniqueSurface in the window class uses a SurfaceDeleter with a default parameter for the instance.
The default paramater for the instance is NULL.
Given this, SurfaceDeleter destroys the given surface handle with a NULL interface Handle.
Therefore, the surface is not correctly destroyed e.g. in the window destructor, which can lead to a memory leak or an exception/program crash (e.g. msvc debug mode).
Hi, I have another PR.
UniqueSurface in the window class uses a SurfaceDeleter with a default parameter for the instance. The default paramater for the instance is NULL. Given this, SurfaceDeleter destroys the given surface handle with a NULL interface Handle. Therefore, the surface is not correctly destroyed e.g. in the window destructor, which can lead to a memory leak or an exception/program crash (e.g. msvc debug mode).