|
From: Geisschaes <gei...@us...> - 2005-03-28 08:40:32
|
Update of /cvsroot/macattrick/macattrick In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3195 Modified Files: LineUpController.m LineUpTreeNode.m Log Message: line up memory usage is now cleaned. once the calculation is finished all nodes are deallocated Index: LineUpController.m =================================================================== RCS file: /cvsroot/macattrick/macattrick/LineUpController.m,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** LineUpController.m 7 Feb 2005 21:15:39 -0000 1.18 --- LineUpController.m 28 Mar 2005 08:40:20 -0000 1.19 *************** *** 60,63 **** --- 60,65 ---- NSArray *substitutes = [subLineUpTree bestLineUp]; [self displaySubstitutes: substitutes]; + [lineUpTree release]; + [subLineUpTree release]; } Index: LineUpTreeNode.m =================================================================== RCS file: /cvsroot/macattrick/macattrick/LineUpTreeNode.m,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** LineUpTreeNode.m 21 Jul 2004 19:59:59 -0000 1.5 --- LineUpTreeNode.m 28 Mar 2005 08:40:20 -0000 1.6 *************** *** 82,95 **** Player *restingAvailablePlayer; while (restingAvailablePlayer = [newEnumerator nextObject]) { ! if(restingAvailablePlayer != availablePlayer) ! { [newAvailableSet addObject:restingAvailablePlayer]; } } ! [nextNodes addObject:[[LineUpTreeNode alloc] initWithPlayer: availablePlayer stillAvailablePlayers: newAvailableSet position: nextPosition score: (score + [availablePlayer calculatePositionValue: nextPosition]) ! precedingNode: self]]; } [pool release]; --- 82,96 ---- Player *restingAvailablePlayer; while (restingAvailablePlayer = [newEnumerator nextObject]) { ! if(restingAvailablePlayer != availablePlayer) { [newAvailableSet addObject:restingAvailablePlayer]; } } ! LineUpTreeNode *next = [[LineUpTreeNode alloc] initWithPlayer: availablePlayer stillAvailablePlayers: newAvailableSet position: nextPosition score: (score + [availablePlayer calculatePositionValue: nextPosition]) ! precedingNode: self]; ! [nextNodes addObject: next]; ! [next release]; } [pool release]; |