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
* Subscribes to a property in meta binds metadata cache.
761
-
* This returns a subscription that can be used to unsubscribe as well as update the cache.
762
-
* IF YOU DON'T CALL `unsubscribe` THE SUBSCRIPTION WILL LEAK MEMORY.
761
+
* This expects some sort of lifecycle hook to be passed in.
762
+
* This method will register a callback to the lifecycle hook.
763
+
* To unsubscribe the subscription, the callback registered to the lifecycle hook must be called.
764
+
* In the context of Obsidian, you should pass a `Component` instance as the lifecycle hook and
765
+
* make sure to unload the component when you are done using the metadata subscription.
766
+
*
767
+
* NOT UNSUBSCRIBING WILL LEAD TO MEMORY LEAKS.
763
768
*
764
769
* @param bindTarget
765
770
* @param lifecycleHook In Obsidian this is an instance of the Component class. The subscription will be automatically unsubscribed when the component is unloaded.
0 commit comments