Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reference cycles between python and C++ #147

Merged
merged 2 commits into from
Oct 2, 2021
Merged

Conversation

florianwechsung
Copy link
Contributor

Kick out py_shared_ptr and instead keep the python instance alive manually by holding a reference to it

See pybind/pybind11#1389 for why py_shared_ptr was needed in the first place, and the comment from May 27 why we may not want to use it (reference cycle)

…ually by holding a reference to it

See pybind/pybind11#1389 for why py_shared_ptr was needed in the first place, and the comment from May 27 why we may not want to use it (reference cycle)
@codecov
Copy link

codecov bot commented Sep 23, 2021

Codecov Report

Merging #147 (56ca298) into master (4bf5b85) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #147   +/-   ##
=======================================
  Coverage   90.08%   90.08%           
=======================================
  Files          55       55           
  Lines        6081     6082    +1     
=======================================
+ Hits         5478     5479    +1     
  Misses        603      603           
Flag Coverage Δ
unittests 90.08% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/simsopt/field/magneticfieldclasses.py 97.69% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4bf5b85...56ca298. Read the comment docs.

@mbkumar
Copy link
Collaborator

mbkumar commented Oct 2, 2021

Thanks @florianwechsung

@mbkumar mbkumar merged commit 5980d05 into master Oct 2, 2021
@mbkumar mbkumar deleted the fw/no_py_shared_ptr branch October 2, 2021 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants