From b5f2b398a5d008932435fc818c34df789ccd638b Mon Sep 17 00:00:00 2001 From: Nicolas Mora Bowen Date: Wed, 22 Jul 2026 22:32:51 -0500 Subject: [PATCH] Clear EQ_Constraints in Domain::clearAll() Domain::clearAll() (invoked by wipe()) empties every tagged-object container it owns -- elements, nodes, SP/PC/MP constraints, load patterns, parameters -- except theEQs. The EQ_Constraint objects therefore survived a wipe: they were never freed (memory leak) and, because getNumComponents() stayed nonzero, the domain still reported itself as non-empty afterward. Add the missing theEQs->clearAll() alongside the other constraint containers. No effect on a model that holds no EQ_Constraints. Co-authored-by: Patricio Palacios Co-authored-by: Jose A. Abell --- SRC/domain/domain/Domain.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/SRC/domain/domain/Domain.cpp b/SRC/domain/domain/Domain.cpp index 38c318f949..fe77c56ad6 100644 --- a/SRC/domain/domain/Domain.cpp +++ b/SRC/domain/domain/Domain.cpp @@ -1051,6 +1051,7 @@ Domain::clearAll(void) { theSPs->clearAll(); thePCs->clearAll(); theMPs->clearAll(); + theEQs->clearAll(); // was omitted: EQ_Constraints survived clearAll()/wipe() (leak + stale non-empty domain) theLoadPatterns->clearAll(); theParameters->clearAll(); numParameters = 0;