Skip to content

Commit a6a928e

Browse files
authored
Don't try to free DLL on drop (#1089)
1 parent 083c3c4 commit a6a928e

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/windows/find_tools.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ mod impl_ {
163163
use crate::windows::setup_config::SetupConfiguration;
164164
use crate::windows::vs_instances::{VsInstances, VswhereInstance};
165165
use crate::windows::windows_sys::{
166-
FreeLibrary, GetMachineTypeAttributes, GetProcAddress, LoadLibraryA, UserEnabled, HMODULE,
166+
GetMachineTypeAttributes, GetProcAddress, LoadLibraryA, UserEnabled, HMODULE,
167167
IMAGE_FILE_MACHINE_AMD64, MACHINE_ATTRIBUTES, S_OK,
168168
};
169169
use std::convert::TryFrom;
@@ -211,12 +211,6 @@ mod impl_ {
211211
}
212212
}
213213

214-
impl Drop for LibraryHandle {
215-
fn drop(&mut self) {
216-
unsafe { FreeLibrary(self.0) };
217-
}
218-
}
219-
220214
type GetMachineTypeAttributesFuncType =
221215
unsafe extern "system" fn(u16, *mut MACHINE_ATTRIBUTES) -> i32;
222216
const _: () = {

0 commit comments

Comments
 (0)