Reduce scope of _extScrollView _intScrollView from ivar to local variables, release after setting to content view and fix double-release of _intScrollView.

This commit is contained in:
Riccardo Mottola 2023-01-12 23:33:25 +01:00
parent fc194db093
commit fdebc6367f
3 changed files with 10 additions and 5 deletions

View file

@ -1,3 +1,11 @@
2022-01-12 Riccardo Mottola <rm@gnu.org>
* Modules/Editors/ProjectCenter/PCEditor.h
* Modules/Editors/ProjectCenter/PCEditor.m
Reduce scope of _extScrollView _intScrollView from ivar to local
variables, release after setting to content view and fix
double-release of _intScrollView.
2021-11-30 Riccardo Mottola <rm@gnu.org>
* Modules/Editors/ProjectCenter/PCEditorView.h

View file

@ -38,10 +38,8 @@
id _editorManager;
NSTextField *_extStatusField;
NSScrollView *_extScrollView;
PCEditorView *_extEditorView;
NSTextField *_intStatusField;
NSScrollView *_intScrollView;
PCEditorView *_intEditorView;
NSTextStorage *_storage;
NSMutableString *_path;

View file

@ -41,6 +41,7 @@
- (void)_createWindow
{
NSScrollView *_extScrollView;
unsigned int style;
NSRect winContentRect;
NSRect rect;
@ -110,6 +111,7 @@
- (void)_createInternalView
{
NSScrollView *_intScrollView;
NSRect contRect = NSMakeRect(0,0,512,320);
NSRect rect;
@ -235,9 +237,7 @@
{
if ((self = [super init]))
{
_extScrollView = nil;
_extEditorView = nil;
_intScrollView = nil;
_intEditorView = nil;
_storage = nil;
_categoryPath = nil;
@ -281,7 +281,6 @@
// _window is setReleasedWhenClosed:YES
RELEASE(_path);
RELEASE(_categoryPath);
RELEASE(_intScrollView);
RELEASE(_storage);
RELEASE(_window);