Fix in #182.
Each FireDomain with a propagation layer leaks ~183 kB (construct, addPropagativeLayer("Rothermel"), delete). It grows linearly: +367 MB after 2000 domains. Without the layer the loop stays flat. Measured on dev @ f00d722.
Causes found (they may not explain all 183 kB):
~FireDomain never deletes propagativeLayer (the delete is commented out, FireDomain.cpp:335).
- The
PropagationModel goes into the static propModelsTable and nothing ever removes it.
Fix after #157. While the double-delete is there, freeing the models turns this leak into a crash.
Related: getFreePropModelIndex() (FireDomain.cpp:857) underflows a size_t when the table is full, and getFreeFluxModelIndex can return a slot that is already in use. Neither is reachable today, but a fix here can make them reachable.
This matters for ensembles and long-running Python hosts.
Drafted with Claude Opus 5, reviewed by a maintainer.
Fix in #182.
Each
FireDomainwith a propagation layer leaks ~183 kB (construct,addPropagativeLayer("Rothermel"), delete). It grows linearly: +367 MB after 2000 domains. Without the layer the loop stays flat. Measured ondev@f00d722.Causes found (they may not explain all 183 kB):
~FireDomainnever deletespropagativeLayer(thedeleteis commented out,FireDomain.cpp:335).PropagationModelgoes into the staticpropModelsTableand nothing ever removes it.Fix after #157. While the double-delete is there, freeing the models turns this leak into a crash.
Related:
getFreePropModelIndex()(FireDomain.cpp:857) underflows asize_twhen the table is full, andgetFreeFluxModelIndexcan return a slot that is already in use. Neither is reachable today, but a fix here can make them reachable.This matters for ensembles and long-running Python hosts.
Drafted with Claude Opus 5, reviewed by a maintainer.