Skip to content

Objective-C: Memory management; tracking object lifetime #100

@wokalski

Description

@wokalski

We have a sort of simple situation with our objective C bindings. Even though objc uses reference counting we only need to modify reference count twice; increase when we create an object (somewhere in nativeComponent's make) and decrement it when we dispose it possibly in deleteNode. I tend to think we should explicitly release objects when we no longer want them and expect all objects to be retained on the objc side before handing them to OCaml.

BriskToolbar is a good example of a trickier case.
https://github.com/briskml/brisk/blob/master/renderer-macos/lib/stubs/BriskToolbar.c#L116

cc @manuhornung who has similar problems in Revery.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions