chuck icon indicating copy to clipboard operation
chuck copied to clipboard

(inquiry) expose UGen destructor

Open mariobuoninfante opened this issue 4 years ago • 0 comments

Hi,

I know we don't have a garbage collector in place, but still there are things that get properly removed when not in use anymore (ie arrays). UGens aren't tackled though, and considering it's been like that since ages now, and nobody really complained, I think it's kind of fine. That said, when you use ChucK on things like RaspPi, being able to free memory used by UGens would be great and could make the difference in certain cases (I know you could code things in a way that is not a big deal, but still....). Also when doing live coding, you end up taking up more and more memory as you launch new programs.

I was wondering if exposing the UGen destructor could be an option (ie delete MyUGen;) . I have to say I haven't thought about the implication of it, and am not sure this is a safe thing :) but I think it would be a good advanced option.

Cheers, Mario

mariobuoninfante avatar May 26 '20 09:05 mariobuoninfante