[gtk+/native-layout] Release view after setting it as contentView
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/native-layout] Release view after setting it as contentView
- Date: Sun, 4 Apr 2010 02:12:58 +0000 (UTC)
commit b8fa675a6a3f0311b3bca1d201cbe2451e29043c
Author: Kristian Rietveld <kris gtk org>
Date: Wed Dec 30 14:14:21 2009 +0100
Release view after setting it as contentView
Fixes GdkQuartzView being leaked.
gdk/quartz/gdkwindow-quartz.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index be7ee01..fa5d917 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -1058,6 +1058,7 @@ _gdk_window_impl_new (GdkWindow *window,
impl->view = [[GdkQuartzView alloc] initWithFrame:content_rect];
[impl->view setGdkWindow:window];
[impl->toplevel setContentView:impl->view];
+ [impl->view release];
}
break;
@@ -1079,6 +1080,7 @@ _gdk_window_impl_new (GdkWindow *window,
/* GdkWindows should be hidden by default */
[impl->view setHidden:YES];
[parent_impl->view addSubview:impl->view];
+ [impl->view release];
}
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]