I've been wondering if I'm creating memory leaks in my app by not stopping spawned machines. I have a map machine that spawns "pin" machines based on the results of a search. When a new search is performed, I simply replace the pins ref with a mapping of new machines, something like:
spawnPins: assign((_, { data }) => ({ ref: data.map(datum => pinMachine.withContext(datum) })
Does not iterating over the previously spawned machines and stoping them cause issues? The app seems fine so I dunno if I really need to but I'm also not sure of the repercussions of having orphaned machines (or if I'm even creating them by doing this).