your polyphonic engine needs to manage this. for each synth that is created, you must have a way of freeing it. in fact you must free all resources you created (including synths) from your engine’s cleanup method. cleanup will be called on your engine whenever a different engine is loaded.
a typical technique is to matintain a dedicated Group that is the parent of all the synths you create. then you can easily free everything in that group.
for example, in Molly the Polly, the killAllNotes method looks like this:
where voiceGroup is a Group (server-side construct) to which all the per-voice synths belong (so messages to voiceGroup will be passed to its children.)
and voiceList is a collection of client-side handles for manipulating the synths directly.