Run gofmt -w on everything. Add 'gogc' option to use Go garbage

collector for memory management.
This commit is contained in:
gmp
2019-06-11 12:38:22 -04:00
parent d0654613ea
commit 9a4fabda24
297 changed files with 6690 additions and 6641 deletions
+40
View File
@@ -0,0 +1,40 @@
package ns
/*
#cgo CFLAGS: -x objective-c -fno-objc-arc
#cgo LDFLAGS: -framework Foundation
#pragma clang diagnostic ignored "-Wformat-security"
#import <Foundation/Foundation.h>
*/
import "C"
import (
"unsafe"
)
//export MyClassRelease
func MyClassRelease(o unsafe.Pointer) {
MyClassMux.RLock()
cb := MyClassLookup[o].Release
MyClassMux.RUnlock()
if cb == nil { return }
self := MyClass{}
self.ptr = o
super := MyClassSupermethods{
self.SuperRelease,
}
cb(super)
}
//export MyClassDealloc
func MyClassDealloc(o unsafe.Pointer) {
MyClassMux.RLock()
cb := MyClassLookup[o].Dealloc
MyClassMux.RUnlock()
if cb == nil { return }
cb()
}
File diff suppressed because it is too large Load Diff