Share object between instances?

Sep 3, 2013 at 11:55pm

Share object between instances?

Hi,

To share an object between instances, i can see three approaches:

1. Object registered in the patcher’s obex (object_obex_store / object_obex_lookup).
2. Static object in the class.
3. Object binding to a t_symbol (such in Tim’s blog / globalsymbol_reference).

Each have different visibility.

1. Shareable between all instances of all classes inside the same patcher’s tree.
2. Shareable between all instances of the given class only.
3. Shareable between all instances of all classes.

Is there more techniques ?

#264178
Sep 4, 2013 at 6:09am

Oops.

4. Object_register / Object_unregister.
5. Disk I/O.

Visibility:

4. Shareable between all instances of all classes.
5. Ditto (but serious pitfalls).

#264221

You must be logged in to reply to this topic.