From 9e99c1d4788553e6b10eff579cbe94d75cbbf774 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 2 Sep 2019 13:13:27 -0400 Subject: [PATCH] Fix memory problems found by the analyzer. --- Source/BSSourceView.h | 2 +- Source/BSSourceView.mm | 3 ++- Source/DebuggerController.m | 5 +++++ Source/DebuggerModel.m | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Source/BSSourceView.h b/Source/BSSourceView.h index b940289..445a56f 100644 --- a/Source/BSSourceView.h +++ b/Source/BSSourceView.h @@ -44,7 +44,7 @@ @property (nonatomic, readonly) NSTextView* textView; @property (nonatomic, readonly) NSScrollView* scrollView; @property (nonatomic, retain) NSSet* markers; -@property (nonatomic, assign) NSString* file; +@property (nonatomic, retain) NSString* file; @property (nonatomic, assign) NSUInteger markedLine; @property (nonatomic, assign) id delegate; diff --git a/Source/BSSourceView.mm b/Source/BSSourceView.mm index 0e0bc0e..98e1943 100644 --- a/Source/BSSourceView.mm +++ b/Source/BSSourceView.mm @@ -57,7 +57,8 @@ - (void)dealloc { [file_ release]; - + [markers_ release]; + [scrollView_ removeFromSuperview]; [textView_ removeFromSuperview]; diff --git a/Source/DebuggerController.m b/Source/DebuggerController.m index d1f60da..677e475 100644 --- a/Source/DebuggerController.m +++ b/Source/DebuggerController.m @@ -94,6 +94,11 @@ [_breakpointsController release]; [_evalController release]; [_expandedVariables release]; + + [_segmentControl release]; + [_statusField release]; + [_tabView release]; + [super dealloc]; } diff --git a/Source/DebuggerModel.m b/Source/DebuggerModel.m index c5d6656..3e588c1 100644 --- a/Source/DebuggerModel.m +++ b/Source/DebuggerModel.m @@ -40,6 +40,7 @@ - (void)dealloc { [_breakpointManager release]; [_status release]; + [_lastError release]; [_stack release]; [super dealloc]; } -- 2.43.5