Documentation
¶
Overview ¶
Package objcblock creates Objective-C blocks whose storage remains valid across Go stack moves and garbage collection.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New returns a retained block for fn, whose first argument must be objc.Block. It supports the scalar, pointer and struct arguments the platform backends use. The caller releases its reference with Block.Release after the receiving API has copied the block, or once the callback is no longer needed. Invoke it through native APIs, not purego's Go-only Block.Invoke cache.
func NewWithCleanup ¶
NewWithCleanup is New with cleanup called when the block's final native reference is released. Cleanup may run on any thread.
Types ¶
This section is empty.