mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 13:51:55 +00:00
Fixed memory leak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7325 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5510e57ed7
commit
400e191b8c
1 changed files with 8 additions and 8 deletions
|
@ -2552,13 +2552,13 @@
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
// create a new col matrix
|
// create a new col matrix
|
||||||
matrix = [[[_browserMatrixClass alloc]
|
matrix = [_browserMatrixClass alloc];
|
||||||
initWithFrame: matrixRect
|
matrix = [matrix initWithFrame: matrixRect
|
||||||
mode: NSListModeMatrix
|
mode: NSListModeMatrix
|
||||||
prototype: _browserCellPrototype
|
prototype: _browserCellPrototype
|
||||||
numberOfRows: n
|
numberOfRows: n
|
||||||
numberOfColumns: 1]
|
numberOfColumns: 1];
|
||||||
autorelease];
|
AUTORELEASE (matrix);
|
||||||
[matrix setAllowsEmptySelection: _allowsEmptySelection];
|
[matrix setAllowsEmptySelection: _allowsEmptySelection];
|
||||||
if (!_allowsMultipleSelection)
|
if (!_allowsMultipleSelection)
|
||||||
[matrix setMode: NSRadioModeMatrix];
|
[matrix setMode: NSRadioModeMatrix];
|
||||||
|
@ -2582,7 +2582,6 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//NSRect matrixRect = {{0, 0}, {100, 100}};
|
|
||||||
// create a new col matrix
|
// create a new col matrix
|
||||||
matrix = [_browserMatrixClass alloc];
|
matrix = [_browserMatrixClass alloc];
|
||||||
[matrix initWithFrame: matrixRect
|
[matrix initWithFrame: matrixRect
|
||||||
|
@ -2590,6 +2589,7 @@
|
||||||
prototype: _browserCellPrototype
|
prototype: _browserCellPrototype
|
||||||
numberOfRows: 0
|
numberOfRows: 0
|
||||||
numberOfColumns: 0];
|
numberOfColumns: 0];
|
||||||
|
AUTORELEASE (matrix);
|
||||||
[matrix setAllowsEmptySelection: _allowsEmptySelection];
|
[matrix setAllowsEmptySelection: _allowsEmptySelection];
|
||||||
if (_allowsMultipleSelection)
|
if (_allowsMultipleSelection)
|
||||||
[matrix setMode: NSListModeMatrix];
|
[matrix setMode: NSListModeMatrix];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue