Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete! doesn't delete references #258

Open
carstenbauer opened this issue May 13, 2019 · 0 comments
Open

delete! doesn't delete references #258

carstenbauer opened this issue May 13, 2019 · 0 comments

Comments

@carstenbauer
Copy link

MWE:

julia> using JLD

julia> x = [rand(2,2) for _ in 1:100];

julia> @save "test.jld" x

julia> jldopen("test.jld", "r+") do f
           delete!(f, "x")
       end
false

julia> jldopen("test.jld", "r") do f
           names(f["_refs"])
       end
100-element Array{String,1}:
 "00000001"
 "00000002"
 "00000003"
 "00000004"
 "00000005"
 "00000006"
 "00000007"
 "00000008"
 "00000009"
 "00000010"
 "00000011"
 "00000012"
 
 "00000090"
 "00000091"
 "00000092"
 "00000093"
 "00000094"
 "00000095"
 "00000096"
 "00000097"
 "00000098"
 "00000099"
 "00000100"

Looking at https://github.com/JuliaIO/JLD.jl/blob/master/src/JLD.jl#L311 it's obvious why the references haven't been deleted. The references simply aren't in refspath = "/_refs/x".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant