mirror of https://github.com/libsdl-org/SDL.git
Follow the same pattern for releasing the window data in the UIKit driver
Possible fix for https://github.com/libsdl-org/SDL/issues/7361
This commit is contained in:
parent
5d3234d8ae
commit
ebdb320651
|
|
@ -315,7 +315,7 @@ void UIKit_DestroyWindow(_THIS, SDL_Window *window)
|
||||||
{
|
{
|
||||||
@autoreleasepool {
|
@autoreleasepool {
|
||||||
if (window->driverdata != NULL) {
|
if (window->driverdata != NULL) {
|
||||||
SDL_UIKitWindowData *data = (SDL_UIKitWindowData *)CFBridgingRelease(window->driverdata);
|
SDL_UIKitWindowData *data = (__bridge SDL_UIKitWindowData *)window->driverdata;
|
||||||
NSArray *views = nil;
|
NSArray *views = nil;
|
||||||
|
|
||||||
[data.viewcontroller stopAnimation];
|
[data.viewcontroller stopAnimation];
|
||||||
|
|
@ -335,6 +335,7 @@ void UIKit_DestroyWindow(_THIS, SDL_Window *window)
|
||||||
data.uiwindow.rootViewController = nil;
|
data.uiwindow.rootViewController = nil;
|
||||||
data.uiwindow.hidden = YES;
|
data.uiwindow.hidden = YES;
|
||||||
|
|
||||||
|
CFRelease(window->driverdata);
|
||||||
window->driverdata = NULL;
|
window->driverdata = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue