diff options
author | Kevin Walzer <kw@codebykevin.com> | 2015-03-21 01:22:30 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2015-03-21 01:22:30 (GMT) |
commit | 6596343ef6a711a8b5a51e17c946f206a90efe16 (patch) | |
tree | aa5390457f8371d6bf3eb56d179db157eaecc722 /macosx/tkMacOSXWm.c | |
parent | 4f6c1ad7943f8c595d9d539a6c6c33c96832554b (diff) | |
download | tk-6596343ef6a711a8b5a51e17c946f206a90efe16.zip tk-6596343ef6a711a8b5a51e17c946f206a90efe16.tar.gz tk-6596343ef6a711a8b5a51e17c946f206a90efe16.tar.bz2 |
Cleanup and simplification of memory management in event loop; now works more smoothly; thanks to Marc Culler for patches
Diffstat (limited to 'macosx/tkMacOSXWm.c')
-rw-r--r-- | macosx/tkMacOSXWm.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index ffb3c34..8866118 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -21,6 +21,8 @@ #include "tkMacOSXEvent.h" #include "tkMacOSXDebug.h" +#define DEBUG_ZOMBIES 0 + /* #ifdef TK_MAC_DEBUG #define TK_MAC_DEBUG_WINDOWS @@ -350,6 +352,17 @@ static void RemapWindows(TkWindow *winPtr, kHelpWindowClass || winPtr->wmInfoPtr->attributes & kWindowNoActivatesAttribute)) ? NO : YES; } + +- (id) retain +{ +#if DEBUG_ZOMBIES + const char *title = [[self title] UTF8String]; + if (title != NULL) { + printf("Retaining %s with count %lu\n", title, [self retainCount]); + } +#endif + return [super retain]; +} @end #pragma mark - @@ -781,7 +794,6 @@ TkWmDeadWindow( if (parent) { [parent removeChildWindow:window]; } - [window setExcludedFromWindowsMenu:YES]; [window close]; TkMacOSXUnregisterMacWindow(window); if (winPtr->window) { |