Skip to content

Commit 84ea1e6

Browse files
j-fuCopilot
andauthored
Add error handling to finalizer
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 526d2e1 commit 84ea1e6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Pardiso.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,9 @@ function pardisoinit(ps::AbstractPardisoSolver)
216216
ccall_pardisoinit(ps)
217217
finalizer(ps) do ps
218218
set_phase!(ps, RELEASE_ALL)
219-
pardiso(ps)
219+
finalizer(ps) do obj
220+
set_phase!(obj, RELEASE_ALL)
221+
pardiso(obj)
220222
end
221223
return
222224
end

0 commit comments

Comments
 (0)