mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 12:45:35 +08:00
[fix] fix same memory leak issue
This commit is contained in:
@@ -548,7 +548,7 @@ int Render::AudioDeviceInit() {
|
||||
|
||||
int Render::AudioDeviceDestroy() {
|
||||
SDL_PauseAudioDevice(output_dev_, 1);
|
||||
// SDL_CloseAudioDevice(output_dev_);
|
||||
SDL_CloseAudioDevice(output_dev_);
|
||||
// SDL_CloseAudioDevice(input_dev_);
|
||||
|
||||
return 0;
|
||||
@@ -1084,11 +1084,16 @@ void Render::Cleanup() {
|
||||
mouse_controller_ = nullptr;
|
||||
}
|
||||
|
||||
if (keyboard_capturer_) {
|
||||
delete keyboard_capturer_;
|
||||
keyboard_capturer_ = nullptr;
|
||||
}
|
||||
|
||||
CleanupFactories();
|
||||
CleanupPeers();
|
||||
AudioDeviceDestroy();
|
||||
DestroyMainWindow();
|
||||
DestroyMainWindowContext();
|
||||
DestroyMainWindow();
|
||||
SDL_Quit();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user