diff --git a/src/PLUGIN/plugin.cpp b/src/PLUGIN/plugin.cpp index 7326563003..600d2fd8fa 100644 --- a/src/PLUGIN/plugin.cpp +++ b/src/PLUGIN/plugin.cpp @@ -412,6 +412,8 @@ void plugin_unload(const char *style, const char *name, LAMMPS *lmp) } else if (pstyle == "region") { + // must delete all region instances using this region style + for (auto &iregion : lmp->domain->get_region_by_style(name)) lmp->domain->delete_region(iregion);