macdriver
macdriver copied to clipboard
add wrapper for managing Release with GC
Helper for #49 to wrap an Object
that will be released when it is freed by the
Go garbage collector.
If the type was exported as maybe GarbageCollected
, you could then type assert to find out if an object has this finalizer set: gcobj, ok := obj.(GarbageCollected)
Does anybody know how ARC works when using libobjc? Retain/release are considered obsolete, but in theory they can still be used for manual ref counting. Nobody has actually figured out what's going on here yet or what should be done, so all macdriver programs could be leaking objects.
Got an objc.Retain function to do this now as documented in https://github.com/progrium/macdriver/blob/main/docs/memorymanagement.md