You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The approaches I learned about here should apply in a very similar way to ref-counted Objective-C as they do for C++ smart pointers, so I'm leaving this here for reference
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
'smake
) and decrement it when we dispose it possibly indeleteNode
. 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.
The text was updated successfully, but these errors were encountered: