Added missing gc-cleanup for <g-mount-operation>s.
authorMatt Birkholz <matt@birkholz.chandler.az.us>
Wed, 17 Aug 2011 21:45:15 +0000 (14:45 -0700)
committerMatt Birkholz <matt@birkholz.chandler.az.us>
Wed, 17 Aug 2011 21:45:15 +0000 (14:45 -0700)
src/gtk/gio.scm

index 5f33bc2a0b9eea137db19da9df6b69947e5405a6..3a98df09c304cc02a107489abf5ea95806559730 100644 (file)
@@ -970,12 +970,17 @@ USA.
 (define-class (<g-mount-operation> (constructor ()))
     (<gio>))
 
-(define-method initialize-instance ((gmount <g-mount-operation>))
-  (call-next-method gmount)
-  (let ((alien (gobject-alien gmount)))
+(define-method initialize-instance ((gmountop <g-mount-operation>))
+  (call-next-method gmountop)
+  (add-gc-cleanup gmountop (make-gmountop-cleanup (gio-cleanup-info gmountop)))
+  (let ((alien (gobject-alien gmountop)))
     (set-alien/ctype! alien '|GMountOperation|)
     (C-call "g_mount_operation_new" alien)
-    (error-if-null alien "Could not create:" gmount)))
+    (error-if-null alien "Could not create:" gmountop)))
+
+(define (make-gmountop-cleanup gio-info)
+  (named-lambda (gmountop-cleanup)
+    (cleanup-gio gio-info)))
 
 (define (gfile-mount gfile)
   (let* ((mount-op (make-g-mount-operation))