comparison ios/dw.m @ 2640:cee87daaf150

iOS: New method of removing DWWindow from the hierarchy. The [window release] is causing instability afterward, removing the release makes it appear to function correctly, but might be leaking memory. Adding a TODO to look into this more later, once everything is functional.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 13 Aug 2021 19:55:40 +0000
parents 0be4b2e21885
children 608598b9fed9
comparison
equal deleted inserted replaced
2639:0be4b2e21885 2640:cee87daaf150
8538 8538
8539 /* Handle destroying a top-level window */ 8539 /* Handle destroying a top-level window */
8540 if([object isKindOfClass:[UIWindow class]]) 8540 if([object isKindOfClass:[UIWindow class]])
8541 { 8541 {
8542 DWWindow *window = handle; 8542 DWWindow *window = handle;
8543 [window setHidden:YES];
8543 [_dw_toplevel_windows removeObject:window]; 8544 [_dw_toplevel_windows removeObject:window];
8544 [window setHidden:YES]; 8545 [[[window rootViewController] view] removeFromSuperview];
8545 [window removeFromSuperview]; 8546 [window setRootViewController:nil];
8546 [window release]; 8547 /* Releasing the window is causing crashes....
8548 * TODO: Figure out if this is needed... or why it is crashing.
8549 * [window release];
8550 */
8547 } 8551 }
8548 /* Handle removing menu items from menus */ 8552 /* Handle removing menu items from menus */
8549 else if([object isMemberOfClass:[DWMenuItem class]]) 8553 else if([object isMemberOfClass:[DWMenuItem class]])
8550 { 8554 {
8551 DWMenuItem *item = object; 8555 DWMenuItem *item = object;