object to store matrices.
i send it a keyword and a matrix, and the script makes a new matrix
internally, copies the input into it, and puts both keyword and matrix
in an array within a ‘Global’ namespace.
It works and all is great, but I discover that my copied matrices
persist even after deleting them from my delay.
they stop existing when I delete the ‘Global’ object in which namespace
they live, so to say.
is there something like
am I making myself a bit clear ?
created, maintains and disposes of objects, universes in general…
As I believe is mentioned in the MaxMSP mailing list archives, it is
mymatrix.freepeer() to free the C peer object. Same is true for
Sketch, and Image. The general problem is that the JS GC doesn’t know
about the C peer’s memory and doesn’t prioritize the collection of JS
garbage which is small despite the C peer’s memory. So for these
cases you need to free the peer (or explicitly run the GC, which
happens to happen in new JitterObject() FWIW).