Skip to content

Commit b6b1320

Browse files
committed
Preserving ownership while finalizing ksp solver
1 parent 905ce82 commit b6b1320

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ksp.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,9 @@ end
173173

174174
function ksp_finalize!(setup::KspSeqSetup)
175175
if ! setup.user_handles
176-
ksp_destroy_handles!(setup.handles)
176+
ownership = setup.ownership
177+
handles = setup.handles
178+
GC.@preserve ownership ksp_destroy_handles!(handles)
177179
end
178180
nothing
179181
end

0 commit comments

Comments
 (0)