Skip to content

Commit

Permalink
Fix: fix a memory leak in module_gint (#4721)
Browse files Browse the repository at this point in the history
* fix memory leak in module_gint

* fix memory leak in module_gint
  • Loading branch information
dzzz2001 authored Jul 18, 2024
1 parent be8f40f commit e9e5e53
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ void Gint::cpu_rho_interface(Gint_inout* inout) {
const int ncyz = this->ny * this->nplane;
const double dv = ucell.omega / this->ncxyz;
const double delta_r = this->gridt->dr_uniform;
double* pvpR_thread = nullptr;
hamilt::HContainer<double>* hRGint_thread = nullptr;
#ifdef _OPENMP
#pragma omp for
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@ void Gint::cpu_vlocal_meta_interface(Gint_inout* inout) {
pvpR_reduced[inout->ispin],
1);
}
delete hRGint_thread;
}
delete hRGint_thread;
#endif
ModuleBase::TITLE("Gint_interface", "cal_gint_vlocal_meta");
ModuleBase::timer::tick("Gint_interface", "cal_gint_vlocal_meta");
Expand Down

0 comments on commit e9e5e53

Please sign in to comment.