Module: Vulkan::Finalizer
- Included in:
- Buffer, CommandPool, DescriptorPool, DescriptorSet, DescriptorSetLayout, Fence, Framebuffer, Image, ImageView, Instance, LogicalDevice, Memory, Pipeline, RenderPass, Sampler, Semaphore, ShaderStage, Surface, Swapchain
- Defined in:
- lib/vulkan/finalizer.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
- #finalize_with(vk, cleanup_method_name, *cleanup_method_args) ⇒ Object
- #hexaddr ⇒ Object
- #to_ptr ⇒ Object
Class Method Details
.included(base) ⇒ Object
27 28 29 |
# File 'lib/vulkan/finalizer.rb', line 27 def self.included(base) base.module_eval { extend Vulkan::Finalizer::ClassMethods } end |
Instance Method Details
#finalize_with(vk, cleanup_method_name, *cleanup_method_args) ⇒ Object
31 32 33 |
# File 'lib/vulkan/finalizer.rb', line 31 def finalize_with(vk, cleanup_method_name, *cleanup_method_args) ObjectSpace.define_finalizer(self, self.class.finalizer(vk, cleanup_method_name, *cleanup_method_args)) end |
#hexaddr ⇒ Object
39 40 41 |
# File 'lib/vulkan/finalizer.rb', line 39 def hexaddr to_ptr.to_i.to_s(16) end |
#to_ptr ⇒ Object
35 36 37 |
# File 'lib/vulkan/finalizer.rb', line 35 def to_ptr @handle end |