and for doing teardown - Emscripten and Apple ports can make use of this now so we don't need separate frontend implementations