Using typescript for example, something like the following (w/o types for clarity):
const sSink = new StreamSink();
const createNewFRP = () => {
return sSink.snapshot(cSomething, doSomething).map(myMapper);
}
///Then later on...
const unlistener = createNewFRP().listen(reactToStuff);
//Eventually
unlistener();
In other words the Stream/Cells that are created from createNewFRP
simply get GC'd when they go out of scope, and are only kept from GC via the listener, so when its unlistener is called everything is truly cleared up?
Of course the original Sinks remain available (since they are potentially referenced by the function)