[PD-dev] allow only one instance of external object
Claude Heiland-Allen
claudiusmaximus at goto10.org
Sun Mar 23 11:43:36 CET 2008
best boy wrote:
> hi
> is there a way to keep track of the number of opened instances of an
> external?
Is this an external you are writing? Then yes. Otherwise there's weird
tricks you can probably do to keep track, but not control.
> if so, can anyone point me to an example object?
Just have a global counter variable that you initialise to 0 in
foo_setup(), and in foo_new() you increment it, and in foo_free() you
decrement it.
> thanks
> olli
Claude
--
http://claudiusmaximus.goto10.org
More information about the Pd-dev
mailing list