On Wed, 13 Oct 2004, joerg piringer wrote:
when a string is generated (each operation that returns a string generates a new string) the usage count is set to one and when an object receives a string at one of its inlets the usage count is reduced. if the usage count is zero the string mem is freed.
Why can't you just free the string after it has been sent ? AFAIK the outlet_* functions execute the methods of the connected objects immediately.
Guenter
that works as long as i don't split outlets. my objects don't know how many connections are plugged into an outlet so it cannot set the usage count to the number of connections as it should be. so my (not very beautiful) solution is to introduce an object that splits an inlet into multiple outlets and increases the usage counter accordingly.
i did not find a possibility to find out the number of connections attached to an outlet and i guess there is no method for that. is that correct? or could maybe future versions of pd make it possible for externals to detect the number of connections?
anyway my solution works quite well but i'd like to improve it.
best joerg
-- http://joerg.piringer.net http://www.transacoustic-research.com http://www.iftaf.org http://www.vegetableorchester.org
PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev