diff options
author | Jakub Janků <jjanku@redhat.com> | 2021-02-17 18:55:36 +0100 |
---|---|---|
committer | Jakub Janků <jjanku@redhat.com> | 2021-02-19 12:37:52 +0100 |
commit | 5f65dccb1a11c2901bdc8bf819834a5ffd666eca (patch) | |
tree | a51239e386e907bf656bd331fcaa6ba4d28699cb | |
parent | 09580733f3e1719df5d6bacfa7ce82fced4d00d4 (diff) |
spicy: destroy all windows on disconnection
SpiceWidget holds a strong reference on the SpiceSession.
If the windows are not destroyed, the session isn't freed either.
session_disconnect() does destroy all the channels, but other
objects aren't released until the session's dispose
(audio manager, usb manager, webdav).
Signed-off-by: Jakub Janků <jjanku@redhat.com>
-rw-r--r-- | tools/spicy.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/spicy.c b/tools/spicy.c index b786aa0..5add733 100644 --- a/tools/spicy.c +++ b/tools/spicy.c @@ -1899,6 +1899,9 @@ static void connection_disconnect(spice_connection *conn) static void connection_destroy(SpiceSession *session, spice_connection *conn) { + for (int i = 0; i < SPICE_N_ELEMENTS(conn->wins); i++) { + destroy_spice_window(conn->wins[i]); + } g_object_unref(conn->session); g_hash_table_unref(conn->transfers); g_free(conn); |