Fixed leaks of joystick mutable arrays.

This commit is contained in:
Camilla Berglund
2014-05-29 13:19:08 +02:00
parent 8f2336f02c
commit c6e02c09ff
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -443,6 +443,13 @@ void _glfwTerminateJoysticks(void)
{
_GLFWjoystickIOKit* joystick = &_glfw.iokit_js[i];
removeJoystick(joystick);
if (joystick->axisElements)
CFRelease(joystick->axisElements);
if (joystick->buttonElements)
CFRelease(joystick->buttonElements);
if (joystick->hatElements)
CFRelease(joystick->hatElements);
}
}