Skip to content

Free up esmpy object memory#593

Merged
trexfeathers merged 3 commits into
SciTools:mainfrom
stephenworsley:free_esmf_object_memory
Nov 18, 2025
Merged

Free up esmpy object memory#593
trexfeathers merged 3 commits into
SciTools:mainfrom
stephenworsley:free_esmf_object_memory

Conversation

@stephenworsley

Copy link
Copy Markdown
Contributor

During initialiasation of regridder objects, esmpy objects used to generate those objects are freed from memory using the destroy() method. This was being done for the Regrid object, this PR applies this also to the Field, Grid and Mesh esmpy objects used to create the Regrid object. This is especially important when creating many regridders (e.g. as part of #527) and is also especially important when dealing with Mesh objects, which take up more memory.

Comment thread src/esmf_regrid/esmf_regridder.py Outdated
scitools-ci[bot]
scitools-ci Bot previously requested changes Nov 18, 2025

@scitools-ci scitools-ci Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trexfeathers trexfeathers merged commit d56e3da into SciTools:main Nov 18, 2025
17 checks passed
@scitools-ci scitools-ci Bot removed this from 🚴 Peloton Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants