[ https://issues.apache.org/jira/browse/MINIFICPP-2312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ferenc Gerlits updated MINIFICPP-2312: -------------------------------------- Description: There are several functions in and around Controller Service storage which return shared_ptr's, probably unnecessarily. For example, {noformat} ControllerServiceMap::getAllControllerServices() ControllerServiceNode::getControllerServiceImplementation(); ControllerServiceNode::getLinkedControllerServices(); ControllerServiceNode::getLinkedComponents(); {noformat} Check if these function can return non-owning, possibly const, possibly gsl::non_null, pointers instead of shared_ptrs, and if it is possible, then change them. was: There are several functions in and around Controller Service strorage which return shared_ptr's, probably unnecessarily. For example, {noformat} ControllerServiceMap::getAllControllerServices() ControllerServiceNode::getControllerServiceImplementation(); ControllerServiceNode::getLinkedControllerServices(); ControllerServiceNode::getLinkedComponents(); {noformat} Check if these function can return non-owning, possibly const, possibly gsl::non_null, pointers instead of shared_ptrs, and if it is possible, then change them. > Do not return shared_ptrs unnecessarily in ControllerServiceMap and > ControllerServiceNode > ----------------------------------------------------------------------------------------- > > Key: MINIFICPP-2312 > URL: https://issues.apache.org/jira/browse/MINIFICPP-2312 > Project: Apache NiFi MiNiFi C++ > Issue Type: Improvement > Reporter: Ferenc Gerlits > Assignee: Ferenc Gerlits > Priority: Minor > > There are several functions in and around Controller Service storage which > return shared_ptr's, probably unnecessarily. For example, > {noformat} > ControllerServiceMap::getAllControllerServices() > ControllerServiceNode::getControllerServiceImplementation(); > ControllerServiceNode::getLinkedControllerServices(); > ControllerServiceNode::getLinkedComponents(); > {noformat} > Check if these function can return non-owning, possibly const, possibly > gsl::non_null, pointers instead of shared_ptrs, and if it is possible, then > change them. -- This message was sent by Atlassian Jira (v8.20.10#820010)