comparison nworker_c.rhope @ 121:1af91ceaaf49

Fixed memory leak when an output is only attached to a single null input
author Mike Pavone <pavone@retrodev.com>
date Thu, 28 Oct 2010 21:04:12 -0400
parents cd25171e1bb2
children 18a4403fe576
comparison
equal deleted inserted replaced
120:cd25171e1bb2 121:1af91ceaaf49
975 index <- Int32[ [parts]Index[3] ] 975 index <- Int32[ [parts]Index[3] ]
976 io num <- Int32[ [parts]Index[4] ] 976 io num <- Int32[ [parts]Index[4] ]
977 node <- [[worker]Nodes >>]Index[index] 977 node <- [[worker]Nodes >>]Index[index]
978 dests <- [[node]Wires From >>]Index[io num] {} 978 dests <- [[node]Wires From >>]Index[io num] {}
979 979
980 If[[[dests]Length] = [1]] 980 ,normal <- If[[[dests]Length] = [1]]
981 { 981 {
982 dest index <- [[dests]Index[0]]Index >> 982 [dests]Index[0]
983 dest node <- [[worker]Nodes >>]Index[dest index] 983 {
984 984 dest index <- [~]Index >>
985 [[dest node]Conditions >>]For Backend 985 dest IO <- [~]IO Num >>
986 { 986 }
987 out <- [func]Do If[AndCond[NotCond[~], name], [[func]Instruction Stream]Release[name]] 987 normal <- If[[dest IO] = [-1]] {}
988 }{ 988 {
989 out <- func 989 dest node <- [[worker]Nodes >>]Index[dest index]
990 } 990
991 }{ 991 [[dest node]Conditions >>]For Backend
992 {
993 out <- [func]Do If[AndCond[NotCond[~], name], [[func]Instruction Stream]Release[name]]
994 }{
995 out <- func
996 }
997 }
998 }
999
1000 Val[normal]
1001 {
992 do if <- If[[[node]Outputs >>] > [1]] {} 1002 do if <- If[[[node]Outputs >>] > [1]] {}
993 { 1003 {
994 do if <- [[node]Conditions >>]Empty? {} 1004 do if <- [[node]Conditions >>]Empty? {}
995 { 1005 {
996 out <- [func]Release[name] 1006 out <- [func]Release[name]