A RefCounted will perform the specified action when the count reaches 0
Modulevulkan-utils-0.5.11.0Haskell2010
Vulkan.Utils.RefCounted
Lightweight reference counter that runs a release action when the count hits zero. Useful for keeping a Vulkan object alive across an unknown number of in-flight frames — bump the count when a frame starts using it, drop the count when the frame retires, and the object is destroyed promptly after the last frame finishes.
- 1 type
- 4 values
- Packagevulkan-utils-0.5.11.0
- Exports5
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceRefCounted.hs
Create a counter with a value of 1
Decrement the value, the action will be run promptly and in this thread if the counter reached 0.
Increment the counter by 1
Hold a reference for the duration of the MonadResource action