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

Overhaul memory smart pointer #149

Merged
merged 4 commits into from
Nov 10, 2024
Merged

Conversation

inakleinbottle
Copy link
Contributor

Boost intrusive pointers might not be the way we want to keep smart pointers in the future, so we have made an alias for them. This should make it easier to replace it in the future if necessary

Add a new file "smart_ptr.h" to simplify the use of Boost intrusive pointers. This includes template aliases for reference-counted smart pointers and their base class, enhancing memory management in the project. Additionally, update the CMakeLists.txt to include the new header file.
Replaced Boost intrusive pointers with the custom Rc smart pointers across multiple headers for consistency and potential performance improvements. This change impacts device handling, algebra context, basis, and linear operator functionalities.
Refactored the code to use the internal `Rc` smart pointers instead of `boost::intrusive_ptr`. This change improves maintainability and reduces dependency on external libraries. Included necessary header files for the new smart pointers.
Transition from Boost's intrusive_ref_counter to mem::RcBase for better memory management consistency across the codebase. This adjustment affects the DeviceHandle, ContextBase, and BasisInterface classes.
@inakleinbottle inakleinbottle merged commit 49b682f into main Nov 10, 2024
6 checks passed
@inakleinbottle inakleinbottle deleted the overhaul-memory-smart-pointer branch November 10, 2024 20:50
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.

1 participant