From 2f72f84ae531164d2e6bb34eedfec99945e42ed2 Mon Sep 17 00:00:00 2001 From: Allan Odgaard Date: Thu, 12 Sep 2013 17:22:00 +0200 Subject: [PATCH] Add leak watcher and some debug output --- Frameworks/HTMLOutput/src/OakHTMLOutputView.mm | 9 +++++---- Frameworks/HTMLOutputWindow/src/HTMLOutputWindow.mm | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Frameworks/HTMLOutput/src/OakHTMLOutputView.mm b/Frameworks/HTMLOutput/src/OakHTMLOutputView.mm index f68ec3c7..442f34e9 100644 --- a/Frameworks/HTMLOutput/src/OakHTMLOutputView.mm +++ b/Frameworks/HTMLOutput/src/OakHTMLOutputView.mm @@ -3,19 +3,20 @@ #import "helpers/HOAutoScroll.h" #import "helpers/HOJSBridge.h" #import +#import extern NSString* const kCommandRunnerURLScheme; // from HTMLOutput.h @interface OakHTMLOutputView () +{ + OBJC_WATCH_LEAKS(OakHTMLOutputView); + std::map environment; +} @property (nonatomic, assign) BOOL runningCommand; @property (nonatomic, retain) HOAutoScroll* autoScrollHelper; @end @implementation OakHTMLOutputView -{ - std::map environment; -} - - (id)initWithFrame:(NSRect)frame { if(self = [super initWithFrame:frame]) diff --git a/Frameworks/HTMLOutputWindow/src/HTMLOutputWindow.mm b/Frameworks/HTMLOutputWindow/src/HTMLOutputWindow.mm index e524bca3..bce890e5 100644 --- a/Frameworks/HTMLOutputWindow/src/HTMLOutputWindow.mm +++ b/Frameworks/HTMLOutputWindow/src/HTMLOutputWindow.mm @@ -11,6 +11,7 @@ static std::multimap Windows; @interface HTMLOutputWindowController () { + OBJC_WATCH_LEAKS(HTMLOutputWindowController); command::runner_ptr runner; } @property (nonatomic, retain) OakHTMLOutputView* htmlOutputView; @@ -20,6 +21,7 @@ static std::multimap Windows; @implementation HTMLOutputWindowController - (id)initWithRunner:(command::runner_ptr const&)aRunner { + D(DBF_HTMLOutputWindow, bug("\n");); if(self = [super init]) { self.window = [[NSWindow alloc] initWithContentRect:NSMakeRect(100, 100, 100, 100) styleMask:(NSTitledWindowMask|NSClosableWindowMask|NSResizableWindowMask|NSMiniaturizableWindowMask) backing:NSBackingStoreBuffered defer:NO]; @@ -120,6 +122,7 @@ static std::multimap Windows; - (void)dealloc { + D(DBF_HTMLOutputWindow, bug("\n");); self.window.delegate = nil; }