[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/pgtk 56297c0: Fix some leaks
From: |
Yuuki Harano |
Subject: |
feature/pgtk 56297c0: Fix some leaks |
Date: |
Thu, 11 Mar 2021 07:14:40 -0500 (EST) |
branch: feature/pgtk
commit 56297c0f426314dde66614a5c4e459c285af939a
Author: Yuuki Harano <masm+github@masm11.me>
Commit: Yuuki Harano <masm+github@masm11.me>
Fix some leaks
* src/pgtkterm.c (x_free_frame_resources): Free cursors.
(pgtk_delete_terminal): Free cursors and events.
---
src/pgtkterm.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index b965879..10a3999 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -231,6 +231,23 @@ x_free_frame_resources (struct frame *f)
if (f == hlinfo->mouse_face_mouse_frame)
reset_mouse_highlight (hlinfo);
+ g_clear_object (&FRAME_X_OUTPUT (f)->text_cursor);
+ g_clear_object (&FRAME_X_OUTPUT (f)->nontext_cursor);
+ g_clear_object (&FRAME_X_OUTPUT (f)->modeline_cursor);
+ g_clear_object (&FRAME_X_OUTPUT (f)->hand_cursor);
+ g_clear_object (&FRAME_X_OUTPUT (f)->hourglass_cursor);
+ g_clear_object (&FRAME_X_OUTPUT (f)->horizontal_drag_cursor);
+ g_clear_object (&FRAME_X_OUTPUT (f)->vertical_drag_cursor);
+ g_clear_object (&FRAME_X_OUTPUT (f)->left_edge_cursor);
+ g_clear_object (&FRAME_X_OUTPUT (f)->right_edge_cursor);
+ g_clear_object (&FRAME_X_OUTPUT (f)->top_edge_cursor);
+ g_clear_object (&FRAME_X_OUTPUT (f)->bottom_edge_cursor);
+ g_clear_object (&FRAME_X_OUTPUT (f)->top_left_corner_cursor);
+ g_clear_object (&FRAME_X_OUTPUT (f)->top_right_corner_cursor);
+ g_clear_object (&FRAME_X_OUTPUT (f)->bottom_right_corner_cursor);
+ g_clear_object (&FRAME_X_OUTPUT (f)->bottom_left_corner_cursor);
+
+
if (FRAME_X_OUTPUT (f)->border_color_css_provider != NULL)
{
GtkStyleContext *ctxt = gtk_widget_get_style_context (FRAME_WIDGET (f));
@@ -4687,6 +4704,15 @@ pgtk_delete_terminal (struct terminal *terminal)
{
image_destroy_all_bitmaps (dpyinfo);
+ g_clear_object (&dpyinfo->xg_cursor);
+ g_clear_object (&dpyinfo->vertical_scroll_bar_cursor);
+ g_clear_object (&dpyinfo->horizontal_scroll_bar_cursor);
+ g_clear_object (&dpyinfo->invisible_cursor);
+ if (dpyinfo->last_click_event != NULL) {
+ gdk_event_free (dpyinfo->last_click_event);
+ dpyinfo->last_click_event = NULL;
+ }
+
xg_display_close (dpyinfo->gdpy);
/* Do not close the connection here because it's already closed
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- feature/pgtk 56297c0: Fix some leaks,
Yuuki Harano <=