Skip to content

Commit 7bff6f0

Browse files
committed
Preserving ownership while destroying KspMPISetup
1 parent b3cd2de commit 7bff6f0

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
@@ -373,7 +373,9 @@ end
373373

374374
function ksp_finalize!(setup::KspMPISetup)
375375
if ! setup.user_handles
376-
ksp_destroy_handles!(setup.handles)
376+
ownership = setup.ownership
377+
handles = setup.handles
378+
GC.@preserve ownership ksp_destroy_handles!(handles)
377379
end
378380
nothing
379381
end

0 commit comments

Comments
 (0)