~LocationMarkers() emits CatchDeletion, which calls Selection::remove(ArdourMarker*) which in turn calls Editor::marker_selection_changed(), which can cause a heap-use-after-free. So we first need to clear the location_markers map, before deleting the markers.