cellml / libcellml

Repository for libCellML development.
https://libcellml.org
Apache License 2.0
16 stars 21 forks source link

Analyser/Generator: don't use weak pointers #1133

Closed agarny closed 1 year ago

agarny commented 1 year ago

Fixes #1130.

agarny commented 1 year ago

Not sure I'm completely getting the subtleties of the pointers here, but I like the updated tests :) once the CI is passing, this looks good to go.

To fix your original issue was actually very quick. Then, I thought I would get rid of all the weak pointers (in the analyser/generator) since the use of local scopes might cause us a similar problem.

But, I should have clearly been more patient and done it carefully since I now have memory leaks. So, I have now reverted things locally and going through things slowly, but surely.

This PR should therefore be ready for review later today. 🤞 In the meantime, https://github.com/cellml/libcellml/pull/1131 is ready. 🙂