On Sunday, February 7, 2016 at 3:39:51 PM UTC+1, Cedric St-Jean wrote:

> then `a` is stack-allocated. The foo(a) call may either copy `a` further, 
> or just pass on a stack pointer to the existing `a`, depending on compiler 
> details. Any stack-allocated object gets automatically wiped as the stack 
> unwinds, hence does not need GC'ing.
>
>
I think that in this case "a" is heap-allocated, since ImagePos is not a 
bits type. You can check this with isbits(). Just today, I found the 
following post that explains this at length:
http://julialang.org/blog/2013/03/efficient-aggregates/

Cheers,

Bart

Reply via email to