diff --git a/platform/bb10/os_bb10.cpp b/platform/bb10/os_bb10.cpp index d89033b1df0..c8e7ae561e7 100644 --- a/platform/bb10/os_bb10.cpp +++ b/platform/bb10/os_bb10.cpp @@ -195,9 +195,10 @@ void OSBB10::finalize() { // memdelete(debugger_connection_console); //} + memdelete(sample_manager); + audio_server->finish(); memdelete(audio_server); - memdelete(sample_manager); visual_server->finish(); memdelete(visual_server); diff --git a/platform/haiku/os_haiku.cpp b/platform/haiku/os_haiku.cpp index 1edb23d5049..ef483657ca5 100644 --- a/platform/haiku/os_haiku.cpp +++ b/platform/haiku/os_haiku.cpp @@ -137,9 +137,10 @@ void OS_Haiku::finalize() { spatial_sound_2d_server->finish(); memdelete(spatial_sound_2d_server); + memdelete(sample_manager); + audio_server->finish(); memdelete(audio_server); - memdelete(sample_manager); visual_server->finish(); memdelete(visual_server); diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp index 75e0878bac3..8b831140d68 100644 --- a/platform/server/os_server.cpp +++ b/platform/server/os_server.cpp @@ -107,9 +107,10 @@ void OS_Server::finalize() { // memdelete(debugger_connection_console); //} + memdelete(sample_manager); + audio_server->finish(); memdelete(audio_server); - memdelete(sample_manager); visual_server->finish(); memdelete(visual_server); diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index d33469b6f5a..baf85937c6d 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -1375,9 +1375,10 @@ void OS_Windows::finalize() { // memdelete(debugger_connection_console); //} + memdelete(sample_manager); + audio_server->finish(); memdelete(audio_server); - memdelete(sample_manager); physics_server->finish(); memdelete(physics_server); diff --git a/platform/winrt/os_winrt.cpp b/platform/winrt/os_winrt.cpp index 51f60a03624..80ed436b85a 100644 --- a/platform/winrt/os_winrt.cpp +++ b/platform/winrt/os_winrt.cpp @@ -326,10 +326,11 @@ void OSWinrt::finalize() { //if (debugger_connection_console) { // memdelete(debugger_connection_console); //} + + memdelete(sample_manager); audio_server->finish(); memdelete(audio_server); - memdelete(sample_manager); memdelete(input); diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 34bd1184a1d..3218230d0bf 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -452,9 +452,10 @@ void OS_X11::finalize() { // memdelete(debugger_connection_console); //} + memdelete(sample_manager); + audio_server->finish(); memdelete(audio_server); - memdelete(sample_manager); visual_server->finish(); memdelete(visual_server);