Skip to content

Commit

Permalink
Avoid allocating objects with funcitonal form of get! (#208)
Browse files Browse the repository at this point in the history
avoid alloc with functional form of get!
  • Loading branch information
rayegun authored Aug 6, 2022
1 parent 78e48c3 commit 0944c41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/solvers/cholmod.jl
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ function newcommon(; print = 0)
end

function getcommon()
return get!(task_local_storage(), :cholmod_common, newcommon())::Ref{cholmod_common}
return get!(newcommon, task_local_storage(), :cholmod_common)::Ref{cholmod_common}
end

const BUILD_VERSION = VersionNumber(CHOLMOD_MAIN_VERSION, CHOLMOD_SUB_VERSION, CHOLMOD_SUBSUB_VERSION)
Expand Down

0 comments on commit 0944c41

Please sign in to comment.