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

Replace Cabinet by SharedCabinet in clib #164

Closed
ischoegl opened this issue Mar 21, 2023 · 0 comments · Fixed by Cantera/cantera#1513
Closed

Replace Cabinet by SharedCabinet in clib #164

ischoegl opened this issue Mar 21, 2023 · 0 comments · Fixed by Cantera/cantera#1513
Labels
work-in-progress An enhancement that someone is currently working on

Comments

@ischoegl
Copy link
Member

Abstract

Cantera/cantera#1448 introduced SharedCabinet to replace raw pointers by smart pointers on the clib backend. While it is (mostly) a drop-in replacement, there are still several instances where the older Cabinet is in use. Some of this may be relevant to Cantera/cantera#1182, as shared pointers need significantly less effort for manual cleanup.

Motivation

Describe the need for the proposed change:

  • What problem is it trying to solve? ... eliminate raw pointers
  • Who is affected by the change? ... developers - raw pointers are harder to handle
  • Why is this a good solution? ... smart pointers have inherent advantages

Possible Solutions

Implementation is (in most cases) straight-forward, as it only takes replacing several lines at the top of the implementation files (i.e. replace Cabinet by SharedCabinet). Some testing will be necessary, as well as the resolution of one instance of DiagramCabinet::newCopy in ctrpath.cpp, where a suitable solution needs to be implemented by SharedCabinet.

References

@ischoegl ischoegl added feature-request New feature request help wanted Extra attention is needed labels Mar 21, 2023
@ischoegl ischoegl added work-in-progress An enhancement that someone is currently working on and removed feature-request New feature request help wanted Extra attention is needed labels Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work-in-progress An enhancement that someone is currently working on
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant