s.boot;

SynthDef("test-SinOsc", { arg freq; Out.ar(0, SinOsc.ar(freq, 0, 0.1)) }).load(s);

Routine({ inf.do({  arg i;
	var a;
	a = Synth("test-SinOsc", [\freq, rrand(1000.0, 800.0)]);
	0.05.wait;
	a.free;
	0.05.wait;
	if(i % 20 == 0, { s.nodeWatcher.nodes.postln });
}) }).play;

s.nodeWatcher.start;
s.nodeWatcher.stop;

Routine({ inf.do({  arg i;
	var a, m;
	a = Synth.prNew("test-SinOsc", s);
	m = a.newMsg(s, \addToTail, [\freq, rrand(1000.0, 800.0)]);
	s.listSendMsg(m);
	0.05.wait;
	a.free;
	0.05.wait;
	if(i % 20 == 0, {s.nodeWatcher.nodes.postln });
}) }).play;