From e747a5f6cced2aec6ecb0ed2cee24736e54764b1 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 4 Jan 2013 18:23:23 +1100 Subject: Fix object ownership and thus memory management. Change owner and backend properties to (nonatomic, assign) as pointers to owners should not be retained and backend is a pointer to a C++ object. Move property declarations before methods. Update copyright notice. From Mike Lischke at Oracle. --- cocoa/ScintillaCocoa.mm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'cocoa/ScintillaCocoa.mm') diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index be8987083..cdf3f059a 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -381,7 +381,7 @@ const CGFloat paddingHighlightY = 2; ScintillaCocoa::ScintillaCocoa(NSView* view) { - wMain= [view retain]; + wMain = view; // Don't retain since we're owned by view, which would cause a cycle timerTarget = [[[TimerTarget alloc] init: this] retain]; layerFindIndicator = NULL; Initialise(); @@ -393,8 +393,6 @@ ScintillaCocoa::~ScintillaCocoa() { SetTicking(false); [timerTarget release]; - NSView* container = ContentView(); - [container release]; } //-------------------------------------------------------------------------------------------------- -- cgit v1.2.3