diff --git a/src/Memory.hs b/src/Memory.hs index eefab17..90a6458 100644 --- a/src/Memory.hs +++ b/src/Memory.hs @@ -40,12 +40,7 @@ initAllocator physicalDevice device instance' = do } :: VMA.VulkanFunctions) } :: VMA.AllocatorCreateInfo - (_, allocator) <- allocate - (VMA.createAllocator allocatorInfo) - (\allocator -> do - putStrLn "destroying allocator" - VMA.destroyAllocator allocator - ) + (_, allocator) <- VMA.withAllocator allocatorInfo allocate return allocator