diff --git a/GI/Gio/Callbacks.hs b/GI/Gio/Callbacks.hs
--- a/GI/Gio/Callbacks.hs
+++ b/GI/Gio/Callbacks.hs
@@ -584,8 +584,7 @@
     Ptr () ->
     IO CInt
 iOSchedulerJobFuncWrapper funptrptr _cb job cancellable _ = do
-    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
-    job' <- (\x -> IOSchedulerJob <$> newForeignPtr_ x) job
+    job' <- (newPtr IOSchedulerJob) job
     maybeCancellable <-
         if cancellable == nullPtr
         then return Nothing
diff --git a/GI/Gio/Structs/ActionEntry.hs b/GI/Gio/Structs/ActionEntry.hs
--- a/GI/Gio/Structs/ActionEntry.hs
+++ b/GI/Gio/Structs/ActionEntry.hs
@@ -63,9 +63,14 @@
 import GI.Gio.Callbacks
 
 newtype ActionEntry = ActionEntry (ForeignPtr ActionEntry)
+instance WrappedPtr ActionEntry where
+    wrappedPtrCalloc = callocBytes 64
+    wrappedPtrCopy = copyPtr 64
+    wrappedPtrFree = Just ptr_to_g_free
+
 -- | Construct a `ActionEntry` struct initialized to zero.
 newZeroActionEntry :: MonadIO m => m ActionEntry
-newZeroActionEntry = liftIO $ callocBytes 64 >>= wrapPtr ActionEntry
+newZeroActionEntry = liftIO $ wrappedPtrCalloc >>= wrapPtr ActionEntry
 
 instance tag ~ 'AttrSet => Constructible ActionEntry tag where
     new _ attrs = do
diff --git a/GI/Gio/Structs/ActionEntry.hs-boot b/GI/Gio/Structs/ActionEntry.hs-boot
--- a/GI/Gio/Structs/ActionEntry.hs-boot
+++ b/GI/Gio/Structs/ActionEntry.hs-boot
@@ -8,3 +8,4 @@
 import qualified Data.Map as Map
 
 newtype ActionEntry = ActionEntry (ForeignPtr ActionEntry)
+instance WrappedPtr ActionEntry where
diff --git a/GI/Gio/Structs/DBusErrorEntry.hs b/GI/Gio/Structs/DBusErrorEntry.hs
--- a/GI/Gio/Structs/DBusErrorEntry.hs
+++ b/GI/Gio/Structs/DBusErrorEntry.hs
@@ -46,9 +46,14 @@
 import GI.Gio.Callbacks
 
 newtype DBusErrorEntry = DBusErrorEntry (ForeignPtr DBusErrorEntry)
+instance WrappedPtr DBusErrorEntry where
+    wrappedPtrCalloc = callocBytes 16
+    wrappedPtrCopy = copyPtr 16
+    wrappedPtrFree = Just ptr_to_g_free
+
 -- | Construct a `DBusErrorEntry` struct initialized to zero.
 newZeroDBusErrorEntry :: MonadIO m => m DBusErrorEntry
-newZeroDBusErrorEntry = liftIO $ callocBytes 16 >>= wrapPtr DBusErrorEntry
+newZeroDBusErrorEntry = liftIO $ wrappedPtrCalloc >>= wrapPtr DBusErrorEntry
 
 instance tag ~ 'AttrSet => Constructible DBusErrorEntry tag where
     new _ attrs = do
diff --git a/GI/Gio/Structs/DBusErrorEntry.hs-boot b/GI/Gio/Structs/DBusErrorEntry.hs-boot
--- a/GI/Gio/Structs/DBusErrorEntry.hs-boot
+++ b/GI/Gio/Structs/DBusErrorEntry.hs-boot
@@ -8,3 +8,4 @@
 import qualified Data.Map as Map
 
 newtype DBusErrorEntry = DBusErrorEntry (ForeignPtr DBusErrorEntry)
+instance WrappedPtr DBusErrorEntry where
diff --git a/GI/Gio/Structs/DBusInterfaceVTable.hs b/GI/Gio/Structs/DBusInterfaceVTable.hs
--- a/GI/Gio/Structs/DBusInterfaceVTable.hs
+++ b/GI/Gio/Structs/DBusInterfaceVTable.hs
@@ -70,9 +70,14 @@
 import GI.Gio.Callbacks
 
 newtype DBusInterfaceVTable = DBusInterfaceVTable (ForeignPtr DBusInterfaceVTable)
+instance WrappedPtr DBusInterfaceVTable where
+    wrappedPtrCalloc = callocBytes 88
+    wrappedPtrCopy = copyPtr 88
+    wrappedPtrFree = Just ptr_to_g_free
+
 -- | Construct a `DBusInterfaceVTable` struct initialized to zero.
 newZeroDBusInterfaceVTable :: MonadIO m => m DBusInterfaceVTable
-newZeroDBusInterfaceVTable = liftIO $ callocBytes 88 >>= wrapPtr DBusInterfaceVTable
+newZeroDBusInterfaceVTable = liftIO $ wrappedPtrCalloc >>= wrapPtr DBusInterfaceVTable
 
 instance tag ~ 'AttrSet => Constructible DBusInterfaceVTable tag where
     new _ attrs = do
diff --git a/GI/Gio/Structs/DBusInterfaceVTable.hs-boot b/GI/Gio/Structs/DBusInterfaceVTable.hs-boot
--- a/GI/Gio/Structs/DBusInterfaceVTable.hs-boot
+++ b/GI/Gio/Structs/DBusInterfaceVTable.hs-boot
@@ -8,3 +8,4 @@
 import qualified Data.Map as Map
 
 newtype DBusInterfaceVTable = DBusInterfaceVTable (ForeignPtr DBusInterfaceVTable)
+instance WrappedPtr DBusInterfaceVTable where
diff --git a/GI/Gio/Structs/DBusSubtreeVTable.hs b/GI/Gio/Structs/DBusSubtreeVTable.hs
--- a/GI/Gio/Structs/DBusSubtreeVTable.hs
+++ b/GI/Gio/Structs/DBusSubtreeVTable.hs
@@ -30,9 +30,14 @@
 import GI.Gio.Callbacks
 
 newtype DBusSubtreeVTable = DBusSubtreeVTable (ForeignPtr DBusSubtreeVTable)
+instance WrappedPtr DBusSubtreeVTable where
+    wrappedPtrCalloc = callocBytes 88
+    wrappedPtrCopy = copyPtr 88
+    wrappedPtrFree = Just ptr_to_g_free
+
 -- | Construct a `DBusSubtreeVTable` struct initialized to zero.
 newZeroDBusSubtreeVTable :: MonadIO m => m DBusSubtreeVTable
-newZeroDBusSubtreeVTable = liftIO $ callocBytes 88 >>= wrapPtr DBusSubtreeVTable
+newZeroDBusSubtreeVTable = liftIO $ wrappedPtrCalloc >>= wrapPtr DBusSubtreeVTable
 
 instance tag ~ 'AttrSet => Constructible DBusSubtreeVTable tag where
     new _ attrs = do
diff --git a/GI/Gio/Structs/DBusSubtreeVTable.hs-boot b/GI/Gio/Structs/DBusSubtreeVTable.hs-boot
--- a/GI/Gio/Structs/DBusSubtreeVTable.hs-boot
+++ b/GI/Gio/Structs/DBusSubtreeVTable.hs-boot
@@ -8,3 +8,4 @@
 import qualified Data.Map as Map
 
 newtype DBusSubtreeVTable = DBusSubtreeVTable (ForeignPtr DBusSubtreeVTable)
+instance WrappedPtr DBusSubtreeVTable where
diff --git a/GI/Gio/Structs/FileAttributeInfo.hs b/GI/Gio/Structs/FileAttributeInfo.hs
--- a/GI/Gio/Structs/FileAttributeInfo.hs
+++ b/GI/Gio/Structs/FileAttributeInfo.hs
@@ -52,9 +52,14 @@
 import GI.Gio.Callbacks
 
 newtype FileAttributeInfo = FileAttributeInfo (ForeignPtr FileAttributeInfo)
+instance WrappedPtr FileAttributeInfo where
+    wrappedPtrCalloc = callocBytes 16
+    wrappedPtrCopy = copyPtr 16
+    wrappedPtrFree = Just ptr_to_g_free
+
 -- | Construct a `FileAttributeInfo` struct initialized to zero.
 newZeroFileAttributeInfo :: MonadIO m => m FileAttributeInfo
-newZeroFileAttributeInfo = liftIO $ callocBytes 16 >>= wrapPtr FileAttributeInfo
+newZeroFileAttributeInfo = liftIO $ wrappedPtrCalloc >>= wrapPtr FileAttributeInfo
 
 instance tag ~ 'AttrSet => Constructible FileAttributeInfo tag where
     new _ attrs = do
diff --git a/GI/Gio/Structs/FileAttributeInfo.hs-boot b/GI/Gio/Structs/FileAttributeInfo.hs-boot
--- a/GI/Gio/Structs/FileAttributeInfo.hs-boot
+++ b/GI/Gio/Structs/FileAttributeInfo.hs-boot
@@ -8,3 +8,4 @@
 import qualified Data.Map as Map
 
 newtype FileAttributeInfo = FileAttributeInfo (ForeignPtr FileAttributeInfo)
+instance WrappedPtr FileAttributeInfo where
diff --git a/GI/Gio/Structs/FileAttributeInfoList.hs b/GI/Gio/Structs/FileAttributeInfoList.hs
--- a/GI/Gio/Structs/FileAttributeInfoList.hs
+++ b/GI/Gio/Structs/FileAttributeInfoList.hs
@@ -103,7 +103,7 @@
 fileAttributeInfoListReadInfos s = liftIO $ withManagedPtr s $ \ptr -> do
     val <- peek (ptr `plusPtr` 0) :: IO (Ptr FileAttributeInfo)
     result <- convertIfNonNull val $ \val' -> do
-        val'' <- (newPtr 16 FileAttributeInfo) val'
+        val'' <- (newPtr FileAttributeInfo) val'
         return val''
     return result
 
@@ -271,7 +271,7 @@
     name' <- textToCString name
     result <- g_file_attribute_info_list_lookup _obj' name'
     checkUnexpectedReturnNULL "g_file_attribute_info_list_lookup" result
-    result' <- (newPtr 16 FileAttributeInfo) result
+    result' <- (newPtr FileAttributeInfo) result
     touchManagedPtr _obj
     freeMem name'
     return result'
diff --git a/GI/Gio/Structs/IOExtension.hs b/GI/Gio/Structs/IOExtension.hs
--- a/GI/Gio/Structs/IOExtension.hs
+++ b/GI/Gio/Structs/IOExtension.hs
@@ -48,6 +48,12 @@
 import GI.Gio.Callbacks
 
 newtype IOExtension = IOExtension (ForeignPtr IOExtension)
+-- XXX Wrapping a foreign struct/union with no known destructor or size, leak?
+instance WrappedPtr IOExtension where
+    wrappedPtrCalloc = return nullPtr
+    wrappedPtrCopy = return
+    wrappedPtrFree = Nothing
+
 noIOExtension :: Maybe IOExtension
 noIOExtension = Nothing
 
diff --git a/GI/Gio/Structs/IOExtension.hs-boot b/GI/Gio/Structs/IOExtension.hs-boot
--- a/GI/Gio/Structs/IOExtension.hs-boot
+++ b/GI/Gio/Structs/IOExtension.hs-boot
@@ -8,6 +8,7 @@
 import qualified Data.Map as Map
 
 newtype IOExtension = IOExtension (ForeignPtr IOExtension)
+instance WrappedPtr IOExtension where
 data IOExtensionGetNameMethodInfo
 data IOExtensionGetPriorityMethodInfo
 data IOExtensionGetTypeMethodInfo
diff --git a/GI/Gio/Structs/IOExtensionPoint.hs b/GI/Gio/Structs/IOExtensionPoint.hs
--- a/GI/Gio/Structs/IOExtensionPoint.hs
+++ b/GI/Gio/Structs/IOExtensionPoint.hs
@@ -65,6 +65,12 @@
 import GI.Gio.Callbacks
 
 newtype IOExtensionPoint = IOExtensionPoint (ForeignPtr IOExtensionPoint)
+-- XXX Wrapping a foreign struct/union with no known destructor or size, leak?
+instance WrappedPtr IOExtensionPoint where
+    wrappedPtrCalloc = return nullPtr
+    wrappedPtrCopy = return
+    wrappedPtrFree = Nothing
+
 noIOExtensionPoint :: Maybe IOExtensionPoint
 noIOExtensionPoint = Nothing
 
@@ -96,8 +102,7 @@
     name' <- textToCString name
     result <- g_io_extension_point_get_extension_by_name _obj' name'
     checkUnexpectedReturnNULL "g_io_extension_point_get_extension_by_name" result
-    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
-    result' <- (\x -> IOExtension <$> newForeignPtr_ x) result
+    result' <- (newPtr IOExtension) result
     touchManagedPtr _obj
     freeMem name'
     return result'
@@ -126,9 +131,8 @@
 iOExtensionPointGetExtensions _obj = liftIO $ do
     let _obj' = unsafeManagedPtrGetPtr _obj
     result <- g_io_extension_point_get_extensions _obj'
-    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
     result' <- unpackGList result
-    result'' <- mapM (\x -> IOExtension <$> newForeignPtr_ x) result'
+    result'' <- mapM (newPtr IOExtension) result'
     touchManagedPtr _obj
     return result''
 
@@ -223,8 +227,7 @@
     extensionName' <- textToCString extensionName
     result <- g_io_extension_point_implement extensionPointName' type_' extensionName' priority
     checkUnexpectedReturnNULL "g_io_extension_point_implement" result
-    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
-    result' <- (\x -> IOExtension <$> newForeignPtr_ x) result
+    result' <- (newPtr IOExtension) result
     freeMem extensionPointName'
     freeMem extensionName'
     return result'
@@ -250,8 +253,7 @@
     name' <- textToCString name
     result <- g_io_extension_point_lookup name'
     checkUnexpectedReturnNULL "g_io_extension_point_lookup" result
-    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
-    result' <- (\x -> IOExtensionPoint <$> newForeignPtr_ x) result
+    result' <- (newPtr IOExtensionPoint) result
     freeMem name'
     return result'
 
@@ -276,8 +278,7 @@
     name' <- textToCString name
     result <- g_io_extension_point_register name'
     checkUnexpectedReturnNULL "g_io_extension_point_register" result
-    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
-    result' <- (\x -> IOExtensionPoint <$> newForeignPtr_ x) result
+    result' <- (newPtr IOExtensionPoint) result
     freeMem name'
     return result'
 
diff --git a/GI/Gio/Structs/IOExtensionPoint.hs-boot b/GI/Gio/Structs/IOExtensionPoint.hs-boot
--- a/GI/Gio/Structs/IOExtensionPoint.hs-boot
+++ b/GI/Gio/Structs/IOExtensionPoint.hs-boot
@@ -8,6 +8,7 @@
 import qualified Data.Map as Map
 
 newtype IOExtensionPoint = IOExtensionPoint (ForeignPtr IOExtensionPoint)
+instance WrappedPtr IOExtensionPoint where
 data IOExtensionPointGetExtensionByNameMethodInfo
 data IOExtensionPointGetExtensionsMethodInfo
 data IOExtensionPointGetRequiredTypeMethodInfo
diff --git a/GI/Gio/Structs/IOModuleScope.hs b/GI/Gio/Structs/IOModuleScope.hs
--- a/GI/Gio/Structs/IOModuleScope.hs
+++ b/GI/Gio/Structs/IOModuleScope.hs
@@ -46,6 +46,12 @@
 import GI.Gio.Callbacks
 
 newtype IOModuleScope = IOModuleScope (ForeignPtr IOModuleScope)
+-- XXX Wrapping a foreign struct/union with no known destructor or size, leak?
+instance WrappedPtr IOModuleScope where
+    wrappedPtrCalloc = return nullPtr
+    wrappedPtrCopy = return
+    wrappedPtrFree = Nothing
+
 noIOModuleScope :: Maybe IOModuleScope
 noIOModuleScope = Nothing
 
diff --git a/GI/Gio/Structs/IOModuleScope.hs-boot b/GI/Gio/Structs/IOModuleScope.hs-boot
--- a/GI/Gio/Structs/IOModuleScope.hs-boot
+++ b/GI/Gio/Structs/IOModuleScope.hs-boot
@@ -8,5 +8,6 @@
 import qualified Data.Map as Map
 
 newtype IOModuleScope = IOModuleScope (ForeignPtr IOModuleScope)
+instance WrappedPtr IOModuleScope where
 data IOModuleScopeBlockMethodInfo
 data IOModuleScopeFreeMethodInfo
diff --git a/GI/Gio/Structs/IOSchedulerJob.hs b/GI/Gio/Structs/IOSchedulerJob.hs
--- a/GI/Gio/Structs/IOSchedulerJob.hs
+++ b/GI/Gio/Structs/IOSchedulerJob.hs
@@ -43,6 +43,12 @@
 import qualified GI.GLib as GLib
 
 newtype IOSchedulerJob = IOSchedulerJob (ForeignPtr IOSchedulerJob)
+-- XXX Wrapping a foreign struct/union with no known destructor or size, leak?
+instance WrappedPtr IOSchedulerJob where
+    wrappedPtrCalloc = return nullPtr
+    wrappedPtrCopy = return
+    wrappedPtrFree = Nothing
+
 noIOSchedulerJob :: Maybe IOSchedulerJob
 noIOSchedulerJob = Nothing
 
diff --git a/GI/Gio/Structs/IOSchedulerJob.hs-boot b/GI/Gio/Structs/IOSchedulerJob.hs-boot
--- a/GI/Gio/Structs/IOSchedulerJob.hs-boot
+++ b/GI/Gio/Structs/IOSchedulerJob.hs-boot
@@ -8,5 +8,6 @@
 import qualified Data.Map as Map
 
 newtype IOSchedulerJob = IOSchedulerJob (ForeignPtr IOSchedulerJob)
+instance WrappedPtr IOSchedulerJob where
 data IOSchedulerJobSendToMainloopMethodInfo
 data IOSchedulerJobSendToMainloopAsyncMethodInfo
diff --git a/GI/Gio/Structs/IOStreamAdapter.hs b/GI/Gio/Structs/IOStreamAdapter.hs
--- a/GI/Gio/Structs/IOStreamAdapter.hs
+++ b/GI/Gio/Structs/IOStreamAdapter.hs
@@ -27,6 +27,12 @@
 import GI.Gio.Callbacks
 
 newtype IOStreamAdapter = IOStreamAdapter (ForeignPtr IOStreamAdapter)
+-- XXX Wrapping a foreign struct/union with no known destructor or size, leak?
+instance WrappedPtr IOStreamAdapter where
+    wrappedPtrCalloc = return nullPtr
+    wrappedPtrCopy = return
+    wrappedPtrFree = Nothing
+
 noIOStreamAdapter :: Maybe IOStreamAdapter
 noIOStreamAdapter = Nothing
 
diff --git a/GI/Gio/Structs/IOStreamAdapter.hs-boot b/GI/Gio/Structs/IOStreamAdapter.hs-boot
--- a/GI/Gio/Structs/IOStreamAdapter.hs-boot
+++ b/GI/Gio/Structs/IOStreamAdapter.hs-boot
@@ -8,3 +8,4 @@
 import qualified Data.Map as Map
 
 newtype IOStreamAdapter = IOStreamAdapter (ForeignPtr IOStreamAdapter)
+instance WrappedPtr IOStreamAdapter where
diff --git a/GI/Gio/Structs/InputVector.hs b/GI/Gio/Structs/InputVector.hs
--- a/GI/Gio/Structs/InputVector.hs
+++ b/GI/Gio/Structs/InputVector.hs
@@ -49,9 +49,14 @@
 import GI.Gio.Callbacks
 
 newtype InputVector = InputVector (ForeignPtr InputVector)
+instance WrappedPtr InputVector where
+    wrappedPtrCalloc = callocBytes 16
+    wrappedPtrCopy = copyPtr 16
+    wrappedPtrFree = Just ptr_to_g_free
+
 -- | Construct a `InputVector` struct initialized to zero.
 newZeroInputVector :: MonadIO m => m InputVector
-newZeroInputVector = liftIO $ callocBytes 16 >>= wrapPtr InputVector
+newZeroInputVector = liftIO $ wrappedPtrCalloc >>= wrapPtr InputVector
 
 instance tag ~ 'AttrSet => Constructible InputVector tag where
     new _ attrs = do
diff --git a/GI/Gio/Structs/InputVector.hs-boot b/GI/Gio/Structs/InputVector.hs-boot
--- a/GI/Gio/Structs/InputVector.hs-boot
+++ b/GI/Gio/Structs/InputVector.hs-boot
@@ -8,3 +8,4 @@
 import qualified Data.Map as Map
 
 newtype InputVector = InputVector (ForeignPtr InputVector)
+instance WrappedPtr InputVector where
diff --git a/GI/Gio/Structs/NativeSocketAddress.hs b/GI/Gio/Structs/NativeSocketAddress.hs
--- a/GI/Gio/Structs/NativeSocketAddress.hs
+++ b/GI/Gio/Structs/NativeSocketAddress.hs
@@ -29,6 +29,12 @@
 import GI.Gio.Callbacks
 
 newtype NativeSocketAddress = NativeSocketAddress (ForeignPtr NativeSocketAddress)
+-- XXX Wrapping a foreign struct/union with no known destructor or size, leak?
+instance WrappedPtr NativeSocketAddress where
+    wrappedPtrCalloc = return nullPtr
+    wrappedPtrCopy = return
+    wrappedPtrFree = Nothing
+
 noNativeSocketAddress :: Maybe NativeSocketAddress
 noNativeSocketAddress = Nothing
 
diff --git a/GI/Gio/Structs/NativeSocketAddress.hs-boot b/GI/Gio/Structs/NativeSocketAddress.hs-boot
--- a/GI/Gio/Structs/NativeSocketAddress.hs-boot
+++ b/GI/Gio/Structs/NativeSocketAddress.hs-boot
@@ -8,3 +8,4 @@
 import qualified Data.Map as Map
 
 newtype NativeSocketAddress = NativeSocketAddress (ForeignPtr NativeSocketAddress)
+instance WrappedPtr NativeSocketAddress where
diff --git a/GI/Gio/Structs/OutputMessage.hs b/GI/Gio/Structs/OutputMessage.hs
--- a/GI/Gio/Structs/OutputMessage.hs
+++ b/GI/Gio/Structs/OutputMessage.hs
@@ -71,9 +71,14 @@
 import GI.Gio.Callbacks
 
 newtype OutputMessage = OutputMessage (ForeignPtr OutputMessage)
+instance WrappedPtr OutputMessage where
+    wrappedPtrCalloc = callocBytes 40
+    wrappedPtrCopy = copyPtr 40
+    wrappedPtrFree = Just ptr_to_g_free
+
 -- | Construct a `OutputMessage` struct initialized to zero.
 newZeroOutputMessage :: MonadIO m => m OutputMessage
-newZeroOutputMessage = liftIO $ callocBytes 40 >>= wrapPtr OutputMessage
+newZeroOutputMessage = liftIO $ wrappedPtrCalloc >>= wrapPtr OutputMessage
 
 instance tag ~ 'AttrSet => Constructible OutputMessage tag where
     new _ attrs = do
@@ -121,7 +126,7 @@
 outputMessageReadVectors s = liftIO $ withManagedPtr s $ \ptr -> do
     val <- peek (ptr `plusPtr` 8) :: IO (Ptr OutputVector)
     result <- convertIfNonNull val $ \val' -> do
-        val'' <- (newPtr 16 OutputVector) val'
+        val'' <- (newPtr OutputVector) val'
         return val''
     return result
 
diff --git a/GI/Gio/Structs/OutputMessage.hs-boot b/GI/Gio/Structs/OutputMessage.hs-boot
--- a/GI/Gio/Structs/OutputMessage.hs-boot
+++ b/GI/Gio/Structs/OutputMessage.hs-boot
@@ -8,3 +8,4 @@
 import qualified Data.Map as Map
 
 newtype OutputMessage = OutputMessage (ForeignPtr OutputMessage)
+instance WrappedPtr OutputMessage where
diff --git a/GI/Gio/Structs/OutputVector.hs b/GI/Gio/Structs/OutputVector.hs
--- a/GI/Gio/Structs/OutputVector.hs
+++ b/GI/Gio/Structs/OutputVector.hs
@@ -49,9 +49,14 @@
 import GI.Gio.Callbacks
 
 newtype OutputVector = OutputVector (ForeignPtr OutputVector)
+instance WrappedPtr OutputVector where
+    wrappedPtrCalloc = callocBytes 16
+    wrappedPtrCopy = copyPtr 16
+    wrappedPtrFree = Just ptr_to_g_free
+
 -- | Construct a `OutputVector` struct initialized to zero.
 newZeroOutputVector :: MonadIO m => m OutputVector
-newZeroOutputVector = liftIO $ callocBytes 16 >>= wrapPtr OutputVector
+newZeroOutputVector = liftIO $ wrappedPtrCalloc >>= wrapPtr OutputVector
 
 instance tag ~ 'AttrSet => Constructible OutputVector tag where
     new _ attrs = do
diff --git a/GI/Gio/Structs/OutputVector.hs-boot b/GI/Gio/Structs/OutputVector.hs-boot
--- a/GI/Gio/Structs/OutputVector.hs-boot
+++ b/GI/Gio/Structs/OutputVector.hs-boot
@@ -8,3 +8,4 @@
 import qualified Data.Map as Map
 
 newtype OutputVector = OutputVector (ForeignPtr OutputVector)
+instance WrappedPtr OutputVector where
diff --git a/GI/Gio/Structs/SettingsBackend.hs b/GI/Gio/Structs/SettingsBackend.hs
--- a/GI/Gio/Structs/SettingsBackend.hs
+++ b/GI/Gio/Structs/SettingsBackend.hs
@@ -52,6 +52,12 @@
 import GI.Gio.Callbacks
 
 newtype SettingsBackend = SettingsBackend (ForeignPtr SettingsBackend)
+-- XXX Wrapping a foreign struct/union with no known destructor or size, leak?
+instance WrappedPtr SettingsBackend where
+    wrappedPtrCalloc = return nullPtr
+    wrappedPtrCopy = return
+    wrappedPtrFree = Nothing
+
 noSettingsBackend :: Maybe SettingsBackend
 noSettingsBackend = Nothing
 
diff --git a/GI/Gio/Structs/SettingsBackend.hs-boot b/GI/Gio/Structs/SettingsBackend.hs-boot
--- a/GI/Gio/Structs/SettingsBackend.hs-boot
+++ b/GI/Gio/Structs/SettingsBackend.hs-boot
@@ -8,3 +8,4 @@
 import qualified Data.Map as Map
 
 newtype SettingsBackend = SettingsBackend (ForeignPtr SettingsBackend)
+instance WrappedPtr SettingsBackend where
diff --git a/GI/Gio/Structs/StaticResource.hs b/GI/Gio/Structs/StaticResource.hs
--- a/GI/Gio/Structs/StaticResource.hs
+++ b/GI/Gio/Structs/StaticResource.hs
@@ -49,9 +49,14 @@
 import GI.Gio.Callbacks
 
 newtype StaticResource = StaticResource (ForeignPtr StaticResource)
+instance WrappedPtr StaticResource where
+    wrappedPtrCalloc = callocBytes 40
+    wrappedPtrCopy = copyPtr 40
+    wrappedPtrFree = Just ptr_to_g_free
+
 -- | Construct a `StaticResource` struct initialized to zero.
 newZeroStaticResource :: MonadIO m => m StaticResource
-newZeroStaticResource = liftIO $ callocBytes 40 >>= wrapPtr StaticResource
+newZeroStaticResource = liftIO $ wrappedPtrCalloc >>= wrapPtr StaticResource
 
 instance tag ~ 'AttrSet => Constructible StaticResource tag where
     new _ attrs = do
diff --git a/GI/Gio/Structs/StaticResource.hs-boot b/GI/Gio/Structs/StaticResource.hs-boot
--- a/GI/Gio/Structs/StaticResource.hs-boot
+++ b/GI/Gio/Structs/StaticResource.hs-boot
@@ -8,6 +8,7 @@
 import qualified Data.Map as Map
 
 newtype StaticResource = StaticResource (ForeignPtr StaticResource)
+instance WrappedPtr StaticResource where
 data StaticResourceFiniMethodInfo
 data StaticResourceGetResourceMethodInfo
 data StaticResourceInitMethodInfo
diff --git a/GI/Gio/Structs/UnixMountEntry.hs b/GI/Gio/Structs/UnixMountEntry.hs
--- a/GI/Gio/Structs/UnixMountEntry.hs
+++ b/GI/Gio/Structs/UnixMountEntry.hs
@@ -30,6 +30,12 @@
 import GI.Gio.Callbacks
 
 newtype UnixMountEntry = UnixMountEntry (ForeignPtr UnixMountEntry)
+-- XXX Wrapping a foreign struct/union with no known destructor or size, leak?
+instance WrappedPtr UnixMountEntry where
+    wrappedPtrCalloc = return nullPtr
+    wrappedPtrCopy = return
+    wrappedPtrFree = Nothing
+
 noUnixMountEntry :: Maybe UnixMountEntry
 noUnixMountEntry = Nothing
 
diff --git a/GI/Gio/Structs/UnixMountEntry.hs-boot b/GI/Gio/Structs/UnixMountEntry.hs-boot
--- a/GI/Gio/Structs/UnixMountEntry.hs-boot
+++ b/GI/Gio/Structs/UnixMountEntry.hs-boot
@@ -8,3 +8,4 @@
 import qualified Data.Map as Map
 
 newtype UnixMountEntry = UnixMountEntry (ForeignPtr UnixMountEntry)
+instance WrappedPtr UnixMountEntry where
diff --git a/GI/Gio/Structs/UnixMountPoint.hs b/GI/Gio/Structs/UnixMountPoint.hs
--- a/GI/Gio/Structs/UnixMountPoint.hs
+++ b/GI/Gio/Structs/UnixMountPoint.hs
@@ -98,6 +98,12 @@
 import GI.Gio.Callbacks
 
 newtype UnixMountPoint = UnixMountPoint (ForeignPtr UnixMountPoint)
+-- XXX Wrapping a foreign struct/union with no known destructor or size, leak?
+instance WrappedPtr UnixMountPoint where
+    wrappedPtrCalloc = return nullPtr
+    wrappedPtrCopy = return
+    wrappedPtrFree = Nothing
+
 noUnixMountPoint :: Maybe UnixMountPoint
 noUnixMountPoint = Nothing
 
diff --git a/GI/Gio/Structs/UnixMountPoint.hs-boot b/GI/Gio/Structs/UnixMountPoint.hs-boot
--- a/GI/Gio/Structs/UnixMountPoint.hs-boot
+++ b/GI/Gio/Structs/UnixMountPoint.hs-boot
@@ -8,6 +8,7 @@
 import qualified Data.Map as Map
 
 newtype UnixMountPoint = UnixMountPoint (ForeignPtr UnixMountPoint)
+instance WrappedPtr UnixMountPoint where
 data UnixMountPointCompareMethodInfo
 data UnixMountPointFreeMethodInfo
 data UnixMountPointGetDevicePathMethodInfo
diff --git a/gi-gio.cabal b/gi-gio.cabal
--- a/gi-gio.cabal
+++ b/gi-gio.cabal
@@ -1,6 +1,6 @@
 -- Autogenerated, do not edit.
 name:               gi-gio
-version:            0.2.46.14
+version:            0.2.46.15
 synopsis:           Gio bindings
 description:        Bindings for Gio, autogenerated by haskell-gi.
 homepage:           https://github.com/haskell-gi/haskell-gi
@@ -197,9 +197,9 @@
                         GI.Gio.Structs.UnixMountPoint
     pkgconfig-depends:  gio-2.0 >= 2.46
     build-depends: base >= 4.7 && <5,
-        haskell-gi-base >= 0.14 && < 1,
-        gi-glib >= 0.2.46.14 && < 0.2.47,
-        gi-gobject >= 0.2.46.14 && < 0.2.47,
+        haskell-gi-base >= 0.15 && < 1,
+        gi-glib >= 0.2.46.15 && < 0.2.47,
+        gi-gobject >= 0.2.46.15 && < 0.2.47,
         bytestring >= 0.10,
         containers >= 0.5,
         text >= 1.0,
