EnvGen's doneAction argument controls what happens when a finite envelope finishes
UGens that are inherently finite (Line, XLine, EnvGen) have a doneAction argument. doneAction:0 means do nothing when the UGen finishes — the Synth keeps running and consuming CPU even in silence. doneAction:2 means free the enclosing Synth automatically when the UGen completes. These are the two practically important values. If multiple finite UGens in one Synth all have doneAction:2, whichever finishes first will free the Synth. For re-triggerable envelopes intended to be sustained, use doneAction:0 and free the Synth manually; for one-shot sounds, doneAction:2 avoids Synth accumulation.
Examples
env = Line.kr(1, 0, 2, doneAction:2); — frees Synth after 2-second fade.
env = EnvGen.kr(Env.adsr, gate, doneAction:2); — frees after ADSR release phase.
Assessment
You create 10 Synths in a loop, each with a 1-second Line.kr and doneAction:0. What happens on the server? Rewrite the SynthDef line to make each Synth clean up after itself.