]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/ui/backend/gtk/gtk.factor
Merge branch 'gtk' of git://github.com/Blei/factor
[factor.git] / basis / ui / backend / gtk / gtk.factor
index 56ccbd1f5500055c526cf409278e9beade678884..99bbe11ad8d4e9476cccfb2d4d5c54ebd95460d1 100644 (file)
@@ -536,7 +536,10 @@ M:: gtk-ui-backend system-alert ( caption text -- )
     [ gtk_widget_destroy ] tri ;
 
 M: gtk-clipboard clipboard-contents
-    handle>> gtk_clipboard_wait_for_text utf8 alien>string ;
+    [
+        handle>> gtk_clipboard_wait_for_text
+        [ &g_free utf8 alien>string ] [ f ] if*
+    ] with-destructors ;
 
 M: gtk-clipboard set-clipboard-contents
     swap [ handle>> ] [ utf8 string>alien ] bi*