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

refactor frameworkfactory to return a unique_ptr to a conservatorfram… #4

Merged
merged 1 commit into from
Dec 7, 2015

Conversation

rjenkins
Copy link
Owner

@rjenkins rjenkins commented Dec 7, 2015

…ework

ConservatorFramework ConservatorFrameworkFactory::newClient(string connectString) {
return ConservatorFramework(connectString);
unique_ptr<ConservatorFramework> ConservatorFrameworkFactory::newClient(string connectString) {
return unique_ptr<ConservatorFramework>(new ConservatorFramework(connectString));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think make_unique is preferred to a direct allocation: http://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique

@mheffner
Copy link
Collaborator

mheffner commented Dec 7, 2015

👍

rjenkins pushed a commit that referenced this pull request Dec 7, 2015
refactor frameworkfactory to return a unique_ptr to a conservatorfram…
@rjenkins rjenkins merged commit aff9726 into master Dec 7, 2015
@rjenkins rjenkins deleted the chore/return_framework_ptr branch December 7, 2015 20:02
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.

None yet

2 participants