You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
abacus_fixer
committed
fix(esolver): manage dftu_ via std::unique_ptr to prevent memory leak
ESolver_KS::dftu_ was allocated with new in both ESolver_KS_PW and
ESolver_KS_LCAO constructors but never deleted in ~ESolver_KS,
contradicting the member comment and commit 156a5d8. Convert dftu_
to std::unique_ptr<Plus_U_Base> so ownership is explicit and the
object is released automatically on destruction.
Call sites that pass raw pointers to downstream functions use .get();
C++11 baseline requires reset(new ...) instead of std::make_unique.
0 commit comments