Skip to content

Commit

Permalink
Mark arrays as free before releasing the data. (#511)
Browse files Browse the repository at this point in the history
Otherwise the GC can call unsafe_free while we were performing
a manual unsafe_free.
  • Loading branch information
maleadt authored Jan 9, 2024
1 parent e033242 commit a689dff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/host/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ function unsafe_free!(ref::DataRef, args...)
# as multiple releases of the underlying data is not allowed.
return
end
release(ref.rc, args...)
ref.freed = true
release(ref.rc, args...)
return
end

Expand Down

0 comments on commit a689dff

Please sign in to comment.