Add autorelease helpers.

This commit is contained in:
gmp
2019-05-09 13:33:28 -04:00
parent b00ecd4ac0
commit 0d2321d516
4 changed files with 36 additions and 3 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ import (
"gitlab.wow.st/gmp/nswrap/examples/app/ns"
)
func nsmgr() {
func app() {
//Lock OS thread because Cocoa uses thread-local storage
runtime.LockOSThread()
a := ns.NSApplicationSharedApplication()
@@ -50,7 +50,7 @@ func nsmgr() {
}
func main() {
go nsmgr()
go ns.Autorelease(app)
select { }
}
+2 -1
View File
@@ -3,7 +3,8 @@ inputfiles:
- /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h
classes:
- NSArray"
- NSAutoreleasePool
- NSArray
- NSMutableArray
- NSDictionary
- NSEnumerator