Cantera / enhancements

Repository for proposed and ongoing enhancements to Cantera
11 stars 5 forks source link

Replace Cabinet by SharedCabinet in clib #164

Closed ischoegl closed 1 year ago

ischoegl commented 1 year ago

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:

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