summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWm.c
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2015-03-21 01:31:02 (GMT)
committerKevin Walzer <kw@codebykevin.com>2015-03-21 01:31:02 (GMT)
commit6f271af3157483e82be0a839323490597eac5e04 (patch)
tree4968b67a528b6d9e86370951dc604bfa36b14ec8 /macosx/tkMacOSXWm.c
parent50ec1ecb24801b023618048a6704fa12670671d9 (diff)
downloadtk-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.c13
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