From 438efe541c2ca6cdd6f9588ada81b2d57588975d Mon Sep 17 00:00:00 2001 From: Will Kimmerer Date: Sat, 6 Aug 2022 12:52:28 -0400 Subject: [PATCH] avoid alloc with functional form of get! --- src/solvers/cholmod.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/solvers/cholmod.jl b/src/solvers/cholmod.jl index a044c30f..4881923e 100644 --- a/src/solvers/cholmod.jl +++ b/src/solvers/cholmod.jl @@ -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)