Skip to main content

destroy_buffer

Function destroy_buffer 

Source
pub unsafe fn destroy_buffer(
    allocator: &mut Allocator<'_>,
    buffer: Buffer,
    allocation: &mut Allocation,
) -> Result<(), AllocError>
Expand description

Destroy a matching resource pair in buffer-before-memory order with matching retained callbacks.

§Safety

Complete all host/GPU uses. Neither object may have been externally destroyed. The buffer must use this allocator’s callbacks; otherwise destroy it directly then free.