destroyAll method
Destroys every world this engine made in this process, whoever made it — for a hot restart, when the Dart objects that owned them are gone but native memory is not. A world still held reads as disposed.
Implementation
@override
void destroyAll() {
destroyAllCalls++;
for (final world in List.of(worlds)) {
world.dispose();
}
}