When I call createfileW using windows crate, it returns a handle. At this time, the Handle
impl windows_core::Free for HANDLE {
#[inline]
unsafe fn free(&mut self) {
if !self.is_invalid() {
windows_targets::link!("kernel32.dll" "system" fn CloseHandle(hobject : *mut core::ffi::c_void) -> i32);
unsafe {
CloseHandle(self.0);
}
}
}
}
I'm curious how exactly that Free works.
After creating a handle, I need to call closehandle, but i wonder if rust will automatically free it if there is free.
thanks.