mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
internal/uidriver/glfw: Bug fix: Memory leak in Objective-C code
Use an autorelease pool block. Closes #1698
This commit is contained in:
parent
e0fbfc2bb0
commit
519363930a
@ -23,6 +23,7 @@ package glfw
|
|||||||
// #import <AppKit/AppKit.h>
|
// #import <AppKit/AppKit.h>
|
||||||
//
|
//
|
||||||
// static void currentMonitorPos(uintptr_t windowPtr, int* x, int* y) {
|
// static void currentMonitorPos(uintptr_t windowPtr, int* x, int* y) {
|
||||||
|
// @autoreleasepool {
|
||||||
// NSScreen* screen = [NSScreen mainScreen];
|
// NSScreen* screen = [NSScreen mainScreen];
|
||||||
// if (windowPtr) {
|
// if (windowPtr) {
|
||||||
// NSWindow* window = (NSWindow*)windowPtr;
|
// NSWindow* window = (NSWindow*)windowPtr;
|
||||||
@ -39,6 +40,7 @@ package glfw
|
|||||||
// *x = bounds.origin.x;
|
// *x = bounds.origin.x;
|
||||||
// *y = bounds.origin.y;
|
// *y = bounds.origin.y;
|
||||||
// }
|
// }
|
||||||
|
// }
|
||||||
//
|
//
|
||||||
// static bool isNativeFullscreen() {
|
// static bool isNativeFullscreen() {
|
||||||
// return [[NSApplication sharedApplication] currentSystemPresentationOptions] &
|
// return [[NSApplication sharedApplication] currentSystemPresentationOptions] &
|
||||||
|
Loading…
Reference in New Issue
Block a user