MCPcopy Create free account
hub / github.com/Rust-GPU/rust-cuda / drop

Method drop

crates/cust/src/surface.rs:23–35  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

21
22impl Drop for Surface {
23 fn drop(&mut self) {
24 unsafe {
25 // drop the descriptor, which causes the array inside it to be dropped too
26 if false {
27 let res = self.resource_desc();
28 if let Ok(res) = res {
29 let _ = ManuallyDrop::into_inner(res);
30 }
31 }
32
33 cuSurfObjectDestroy(self.handle);
34 }
35 }
36}
37
38pub type SurfaceHandle = c_ulonglong;

Callers

nothing calls this directly

Calls 1

resource_descMethod · 0.45

Tested by

no test coverage detected