[chuck-users] variables and memory

Kassen signal.automatique at gmail.com
Mon Mar 23 19:22:23 EDT 2009

Hey Spencer!

By the way, ChucK's memory model is similar to Java's in that primitive
> types are allocated on the stack, while anything object-y is on the heap.
>  In other words, ints, floats, durs, times, complex's, polars, and empty
> references won't have any memory cost after their enclosing scope ends.

So that means I made a mistake and the temporary variable in a FOR loop
doesn't cause any garbage at all? That's good news! It also means I made a
mistake measuring memory usage some time back, I hope nobody was too badly
confused by my remarks there; I honestly thought those leaked.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20090324/e2d9da65/attachment.html>

More information about the chuck-users mailing list