Complete working GC mode.
This commit is contained in:
@@ -38,9 +38,9 @@ func discoverPeripheral(c *ns.CBCentralManager, p *ns.CBPeripheral, d *ns.NSDict
|
||||
// and if so release the old one. Be careful to check the Objective-C pointers
|
||||
// here as the Go pointers will differ.
|
||||
|
||||
// if peripheral != nil && p.Ptr() != peripheral.Ptr() {
|
||||
// peripheral.Release()
|
||||
// }
|
||||
if peripheral != nil && p.Ptr() != peripheral.Ptr() {
|
||||
peripheral.Release()
|
||||
}
|
||||
|
||||
peripheral = p
|
||||
|
||||
|
||||
+1
-1
@@ -151,7 +151,7 @@ func memtest5() {
|
||||
time.Sleep(time.Second/50)
|
||||
runtime.GC()
|
||||
i++
|
||||
fmt.Printf("loop completed\n")
|
||||
//fmt.Printf("loop completed\n")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user