Open
Description
I'm wondering if the various macros should interact with Julia's GC at all. For example, the Lifetime
object is actually aware of all the references created in its scope:
mutable struct Lifetime
const immutable_refs::Vector{Any}
const immutables_lock::Threads.SpinLock
const mutable_refs::Vector{Any}
const mutables_lock::Threads.SpinLock
@atomic expired::Bool
Lifetime() = new([], Threads.SpinLock(), [], Threads.SpinLock(), false)
end
and so when cleanup!(lifetime)
is called, it could call the finalizers automatically. Which would be very rust-like.
But I'm not sure if this is the direction we want to go because I'm not expecting the borrow checker code to ever be faster than plain Julia. Not sure though.
@MasonProtter do you know if the compiler escape analysis tools will ever be used to free objects without needing the garbage collector? In other words, get more rust-style memory management?
Metadata
Metadata
Assignees
Labels
No labels