[chuck-users] variables and memory

eduard aylon eduard.aylon at gmail.com
Sat Mar 21 11:12:27 EDT 2009


On Mar 20, 2009, at 9:51 PM, mike clemow wrote:

> Hi Dimitris,
>
> It's true that ChucK isn't great with garbage collection.  I
> implemented your code so that it ran every sample:
>
> while ( true )
> {
>        for( 0 => int i; i < 100; i++ )
>        {
>                int var1; float var2[10];
>                // do things
>                1::samp => now;
>        }
> }
>

you could set it to NULL when it's not needed anymore. For instance,

while ( true )
{
        for( 0 => int i; i < 100; i++ )
        {
                int var1; float var2[10];
                // do things
                1::samp => now;
                NULL @=> var2;
        }
}


More information about the chuck-users mailing list