I’m a bit unclear about the new v0.7 GC behaviour - I read that GC is more aggressive than on v0.6, but I failed to locate the details.
In Julia v0.7, may a local variable be GC’ed within a function if it’s not used anymore? Can a function argument be GC’ed? So, for example:
function foo() A = rand(100) bar(A) # ... # A not used from here on # .... end function bar(A::Array) # do something with A # ... # A not used from here on # .... end
Might A be GC’ed after
# A not used from here on in
foo and/or in
bar on Julia v0.7?
When do I need to use the new
GC.@preserve (assuming I need to pass a pointer to
A to some code, not necessarily via
Sorry if there’s already documentation on this - I’d be thankful for a pointer.