Fixed memory leaks in wayland device
This commit is contained in:
parent
50c3ac671b
commit
cf868df93f
@ -715,6 +715,9 @@ CIrrDeviceWayland::CIrrDeviceWayland(const SIrrlichtCreationParameters& params)
|
||||
CIrrDeviceWayland::~CIrrDeviceWayland()
|
||||
{
|
||||
delete m_egl_context;
|
||||
|
||||
if (m_egl_window)
|
||||
wl_egl_window_destroy(m_egl_window);
|
||||
|
||||
if (m_keyboard)
|
||||
wl_keyboard_destroy(m_keyboard);
|
||||
@ -730,15 +733,46 @@ CIrrDeviceWayland::~CIrrDeviceWayland()
|
||||
|
||||
if (m_shell_surface)
|
||||
wl_shell_surface_destroy(m_shell_surface);
|
||||
|
||||
if (m_surface)
|
||||
wl_surface_destroy(m_surface);
|
||||
|
||||
if (m_shell)
|
||||
wl_shell_destroy(m_shell);
|
||||
|
||||
if (m_shm)
|
||||
wl_shm_destroy(m_shm);
|
||||
|
||||
if (m_compositor)
|
||||
wl_compositor_destroy(m_compositor);
|
||||
|
||||
if (m_output)
|
||||
wl_output_destroy(m_output);
|
||||
|
||||
if (m_seat)
|
||||
wl_seat_destroy(m_seat);
|
||||
|
||||
if (m_registry)
|
||||
wl_registry_destroy(m_registry);
|
||||
|
||||
if (m_xkb_state)
|
||||
xkb_state_unref(m_xkb_state);
|
||||
|
||||
if (m_xkb_keymap)
|
||||
xkb_keymap_unref(m_xkb_keymap);
|
||||
|
||||
if (m_xkb_compose_state)
|
||||
xkb_compose_state_unref(m_xkb_compose_state);
|
||||
|
||||
if (m_xkb_compose_table)
|
||||
xkb_compose_table_unref(m_xkb_compose_table);
|
||||
|
||||
if (m_xkb_context)
|
||||
xkb_context_unref(m_xkb_context);
|
||||
|
||||
wl_output_destroy(m_output);
|
||||
wl_seat_destroy(m_seat);
|
||||
wl_registry_destroy(m_registry);
|
||||
wl_display_flush(m_display);
|
||||
wl_display_disconnect(m_display);
|
||||
|
||||
xkb_context_unref(m_xkb_context);
|
||||
|
||||
closeJoysticks();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user