diff options
author | Kevin Walzer <kw@codebykevin.com> | 2015-03-21 01:31:02 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2015-03-21 01:31:02 (GMT) |
commit | 6f271af3157483e82be0a839323490597eac5e04 (patch) | |
tree | 4968b67a528b6d9e86370951dc604bfa36b14ec8 /macosx/tkMacOSXWm.c | |
parent | 50ec1ecb24801b023618048a6704fa12670671d9 (diff) | |
download | tk-6f271af3157483e82be0a839323490597eac5e04.zip tk-6f271af3157483e82be0a839323490597eac5e04.tar.gz tk-6f271af3157483e82be0a839323490597eac5e04.tar.bz2 |
Improvement of memory management, removal of zombie windows from Tk-Cocoa; thanks to Marc Culler for patch
Diffstat (limited to 'macosx/tkMacOSXWm.c')
-rw-r--r-- | macosx/tkMacOSXWm.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 8459bdd..5cec236 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -24,6 +24,8 @@ #define DEBUG_ZOMBIES 0 +#define DEBUG_ZOMBIES 0 + /* #ifdef TK_MAC_DEBUG #define TK_MAC_DEBUG_WINDOWS @@ -351,6 +353,17 @@ static void RemapWindows(TkWindow *winPtr, #endif return [super retain]; } + +- (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 @implementation TKWindow |