# HG changeset patch # User Mike Pavone # Date 1288314252 14400 # Node ID 1af91ceaaf4970b73e54a328cd51b9da76fc5d03 # Parent cd25171e1bb276338d0f365a5abf4babac744ef9 Fixed memory leak when an output is only attached to a single null input diff -r cd25171e1bb2 -r 1af91ceaaf49 nworker_c.rhope --- a/nworker_c.rhope Thu Oct 21 23:55:15 2010 -0400 +++ b/nworker_c.rhope Thu Oct 28 21:04:12 2010 -0400 @@ -977,18 +977,28 @@ node <- [[worker]Nodes >>]Index[index] dests <- [[node]Wires From >>]Index[io num] {} - If[[[dests]Length] = [1]] + ,normal <- If[[[dests]Length] = [1]] { - dest index <- [[dests]Index[0]]Index >> - dest node <- [[worker]Nodes >>]Index[dest index] - - [[dest node]Conditions >>]For Backend + [dests]Index[0] + { + dest index <- [~]Index >> + dest IO <- [~]IO Num >> + } + normal <- If[[dest IO] = [-1]] {} { - out <- [func]Do If[AndCond[NotCond[~], name], [[func]Instruction Stream]Release[name]] - }{ - out <- func + dest node <- [[worker]Nodes >>]Index[dest index] + + [[dest node]Conditions >>]For Backend + { + out <- [func]Do If[AndCond[NotCond[~], name], [[func]Instruction Stream]Release[name]] + }{ + out <- func + } } - }{ + } + + Val[normal] + { do if <- If[[[node]Outputs >>] > [1]] {} { do if <- [[node]Conditions >>]Empty? {}