瀏覽代碼

Added missing module handle freeing.

Camilla Berglund 12 年之前
父節點
當前提交
2656bf8f9f
共有 2 個文件被更改,包括 8 次插入0 次删除
  1. 2 0
      README.md
  2. 6 0
      src/win32_init.c

+ 2 - 0
README.md

@@ -104,6 +104,8 @@ See the [GLFW 3.0 documentation](http://www.glfw.org/docs/3.0/).
  - [Win32] Bugfix: The clipboard string was not freed on terminate
  - [Win32] Bugfix: Entry points for OpenGL 1.0 and 1.1 functions were not
                    returned by `glfwGetProcAddress`
+ - [Win32] Bugfix: The user32 and dwmapi module handles were not freed on
+                   library termination
  - [Cocoa] Bugfix: The clipboard string was not freed on terminate
  - [X11] Bugfix: Override-redirect windows were resized to the desired instead
                  of the actual resolution of the selected video mode

+ 6 - 0
src/win32_init.c

@@ -107,6 +107,12 @@ static void terminateLibraries(void)
         _glfw.win32.winmm.instance = NULL;
     }
 #endif // _GLFW_NO_DLOAD_WINMM
+
+    if (_glfw.win32.user32.instance)
+        FreeLibrary(_glfw.win32.user32.instance);
+
+    if (_glfw.win32.dwmapi.instance)
+        FreeLibrary(_glfw.win32.dwmapi.instance);
 }