I think this is a memory leak here.
The relevant code snippet:
Y_Handle = Ptr{cholmod_dense_struct}(C_NULL)
[...]
status = GC.@preserve x dense_x b dense_b begin
$(cholname(:solve2, TI))(
CHOLMOD_A, L,
Ref(dense_b), C_NULL,
Ref(X_Handle), C_NULL,
Ref(Y_Handle),
Ref(E_Handle),
getcommon($TI))
end
if Y_Handle != C_NULL
free!(Y_Handle)
end
It works that way in C, but not in julia. It must be Y_Handle = Ref(C_NULL), and then if Y_Handle[] != C_NULL .....
PS CHOLMOD allocations · Issue #726 · JuliaSparse/SparseArrays.jl · GitHub