clauswilke / pinetree

🌲 a flexible gene expression simulator with codon-specific translation rates
http://pinetree.readthedocs.io
MIT License
11 stars 5 forks source link

Fix reference cycle that causes model objects to leak #8

Closed alexismhill3 closed 4 years ago

alexismhill3 commented 4 years ago

This fixes a reference cycle that was preventing the central model object from being properly destroyed.

Model stores a shared pointer to a signal object which stores another shared pointer back to model. To break the cycle, model is connect to the signal via a raw pointer instead. The class supports both shared pointers and raw pointers, so no additional changes are required.

clauswilke commented 4 years ago

Thanks!