-
- Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Problem
The sync modifiers (synccomputesmodifier.ts, syncfixesmodifier.ts, syncvariablesmodifier.ts) retrieve name arrays from WASM but never delete them, causing memory leaks.
Current Behavior
In all three sync modifiers:
computeNames,fixNames, orvariableNamesare obtained viagetComputeNames(),getFixNames(), orgetVariableNames()- These
CPPArray<string>objects are used in loops but never cleaned up with.delete() - This causes WASM memory to accumulate over time
Expected Behavior
After the loop completes processing all names, the array wrapper should be deleted to free WASM memory.
Files to Modify
src/modifiers/synccomputesmodifier.ts- AddcomputeNames.delete()after line 123src/modifiers/syncfixesmodifier.ts- AddfixNames.delete()after line 118src/modifiers/syncvariablesmodifier.ts- AddvariableNames.delete()after line 120
Solution
Add .delete() calls after each loop completes, similar to how data1DNamesWrapper, lmpData, and data1DVector are already being deleted elsewhere in the code.
Related
Part of modifier class improvements to fix memory leaks and reduce code duplication.
Metadata
Metadata
Assignees
Labels
No labels