Complete working GC mode.

This commit is contained in:
gmp
2019-06-19 14:07:33 -04:00
parent c8209dd260
commit 4aa1211d73
5 changed files with 50 additions and 45 deletions
+3 -3
View File
@@ -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
View File
@@ -151,7 +151,7 @@ func memtest5() {
time.Sleep(time.Second/50)
runtime.GC()
i++
fmt.Printf("loop completed\n")
//fmt.Printf("loop completed\n")
}
}