Hi,

Consider the following code, 

type TestType
    a::Int
    b::Array{Int, 1}
    c::Tuple{Int, Int}
end

a = 1
b = [2,3]
c = (4,5)

t = TestType(a, b, c)

println(@allocated a)
println(@allocated t.a)
println(@allocated b)
println(@allocated t.b)
println(@allocated c)
println(@allocated t.c)

Output:

0
0
0
0
0
32

I'm puzzled by the allocation that is happening when accessing the tuple 
field, that is the c field. This doesn't happen with the oher two fields, 
nor when referencing the variables directly. 

Any ideas?

Uri

Reply via email to