Fix double free issues

This commit is contained in:
Kyle Lemons
2012-07-22 23:36:03 -07:00
parent acb3aed8c3
commit e5fd0ba6e3
5 changed files with 8 additions and 19 deletions

View File

@@ -7,7 +7,6 @@ import (
"log"
"fmt"
"reflect"
"runtime"
"sync"
"time"
"unsafe"
@@ -45,9 +44,6 @@ func newDevice(handle *C.libusb_device_handle, desc *Descriptor) *Device {
claimed: make(map[uint8]int, ifaces),
}
// This doesn't seem to actually get called
runtime.SetFinalizer(d, (*Device).Close)
return d
}