Skip to content

Commit a689dff

Browse files
authored
Mark arrays as free before releasing the data. (#511)
Otherwise the GC can call unsafe_free while we were performing a manual unsafe_free.
1 parent e033242 commit a689dff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/host/abstractarray.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ function unsafe_free!(ref::DataRef, args...)
8787
# as multiple releases of the underlying data is not allowed.
8888
return
8989
end
90-
release(ref.rc, args...)
9190
ref.freed = true
91+
release(ref.rc, args...)
9292
return
9393
end
9494

0 commit comments

Comments
 (0)