[gtk+] Fix memory leak in GdkQuartzView



commit 3887838244797c11cf590b5f819b1b9810994a3e
Author: Kristian Rietveld <kris gtk org>
Date:   Wed Dec 30 14:11:14 2009 +0100

    Fix memory leak in GdkQuartzView
    
    Should remove the tracking rect in dealloc.

 gdk/quartz/GdkQuartzView.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/gdk/quartz/GdkQuartzView.c b/gdk/quartz/GdkQuartzView.c
index 4ae010c..10f0278 100644
--- a/gdk/quartz/GdkQuartzView.c
+++ b/gdk/quartz/GdkQuartzView.c
@@ -25,6 +25,17 @@
 
 @implementation GdkQuartzView
 
+-(void)dealloc
+{
+  if (trackingRect)
+    {
+      [self removeTrackingRect:trackingRect];
+      trackingRect = 0;
+    }
+
+  [super dealloc];
+}
+
 -(void)setGdkWindow:(GdkWindow *)window
 {
   gdk_window = window;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]