[PD] symbol anxiety

Phil Stone pkstone at ucdavis.edu
Mon Feb 23 22:55:35 CET 2009

Frank Barknecht wrote:
> Hallo,
> Phil Stone hat gesagt: // Phil Stone wrote:
>> Frank Barknecht wrote:
>>> A fix for this maketime would be to reuse the symbols ":00" ... ":59"
>>> for minutes and hours by using two [cnv] objects for these. Then you
>>> would be able to let the clock run for decades before you get into
>>> trouble with the symbol table.
>> I've pondered this, and can't figure out what you mean, unless you're  
>> suggesting having 60 canvases, one for each possible number?
> No, only two canvases, one for minutes, one for seconds. See
> attachment. This way you only ever generate 60 different symbols. As
> existing symbols are reused, your memory usage doesn't grow after
> that.

Oh!  Very good.  I didn't realize that an identical symbol would get
re-used.  For completeness' sake, I will make a new [ps-stopwatch] that
does not leak (and is plain vanilla, to boot).

Cheers, Frank.


More information about the Pd-list mailing list