# System memory 500/15039MB
julia> d = buidModel();
"success"
# System memory at 8883/15039MB
# delete the model object - corresponds to about a 1 Gb LP file
# I observe the same effect if I enter
# julia> d["m"] = 0;
julia> delete!(d, “m”);
# System memory unchanged
julia> gc()
# System memory unchanged
# delete a list of affine expressions used to make constraints in the model - estimated 1GB - 2GB RAMjulia> delete!(d, “aff_exprs”);
# System memory unchanged
julia> gc()
# System memory unchanged
julia> d = 0
# System memory unchanged
julia> gc()
# System memory 8255/15039MBAre you sure the dictionary isn’t still holding on to a reference to your large objects?
julia> d = Dict([1,2],[3,4])
Dict{Int64,Int64} with 2 entries:
2 => 4
1 => 3
julia> names(d)
6-element Array{Symbol,1}:
:slots
:keys
:vals
:ndel
:count
:deleter
julia> d.vals
16-element Array{Int64,1}:
0
0
0
0
0
4
0
0
0
0
0
0
0
0
0
3
julia> delete!(d, 1)
Dict{Int64,Int64} with 1 entry:
2 => 4
julia> d.vals
16-element Array{Int64,1}:
0
0
0
0
0
4
0
0
0
0
0
0
0
0
0
3 # I thought I deleted you!
--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to julia-opt+...@googlegroups.com.
Visit this group at http://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.
I’m not entirely sure (there’s a d.deleter(d) function that seems like it does the trick, but you don’t want to mess around with the internals). I’d ask on the julia-users mailing list.
--