Add leak watcher and some debug output

This commit is contained in:
Allan Odgaard
2013-09-12 17:22:00 +02:00
parent 3f055aa318
commit 2f72f84ae5
2 changed files with 8 additions and 4 deletions

View File

@@ -11,6 +11,7 @@ static std::multimap<oak::uuid_t, HTMLOutputWindowController*> Windows;
@interface HTMLOutputWindowController ()
{
OBJC_WATCH_LEAKS(HTMLOutputWindowController);
command::runner_ptr runner;
}
@property (nonatomic, retain) OakHTMLOutputView* htmlOutputView;
@@ -20,6 +21,7 @@ static std::multimap<oak::uuid_t, HTMLOutputWindowController*> 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<oak::uuid_t, HTMLOutputWindowController*> Windows;
- (void)dealloc
{
D(DBF_HTMLOutputWindow, bug("\n"););
self.window.delegate = nil;
}