Memory leak caused by Ptolemy clone() problem with Director._initializables
Closed this issue · 4 comments
GoogleCodeExporter commented
When cloning a flow, it seems that Ptolemy's clone() does not create separate
copies of important state mgmt properties in Director an other entities.
A dramatic consequence is with ptolemy.actor.Director's use of a
SharedParameter for "time resolution".
This ends up in Director._initializables for each Flow.
But when cloning a Flow, the _initializables collection is not copied, but
becomes shared between original Director and its clone(s).
Who then store their "time resolution" alongside the ones of the preceding
original/clones.
As a consequence this _initializables collection becomes a permanent registry
of (indirect) references to all cloned Directors and their Flows,
causing a memory leak as finished models can never be garbage-collected due to
the pending references in there.
Original issue reported on code.google.com by erwin...@gmail.com
on 14 May 2013 at 8:06
GoogleCodeExporter commented
Original comment by erwin...@gmail.com
on 14 May 2013 at 12:16
- Changed state: Accepted
- Added labels: Performance, Type-Defect
GoogleCodeExporter commented
Original comment by erwin...@gmail.com
on 14 May 2013 at 12:17
- Added labels: Priority-Critical
- Removed labels: Priority-Medium
GoogleCodeExporter commented
Fixes committed on the level of Passerelle's ETDirector and ProcessDirector.
For fundamental fixing, we will collaborate with the Ptolemy team and upgrade
Passerelle to the Ptolemy head then.
Original comment by erwin...@gmail.com
on 14 May 2013 at 12:33
- Changed state: Fixed
GoogleCodeExporter commented
Original comment by erwin...@gmail.com
on 5 May 2014 at 2:46
- Changed state: Verified