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

Improve exception safety with smart pointers #743

Open
elfring opened this issue Dec 27, 2022 · 2 comments
Open

Improve exception safety with smart pointers #743

elfring opened this issue Dec 27, 2022 · 2 comments
Assignees
Labels
Enhancement New feature or request
Projects
Milestone

Comments

@elfring
Copy link

elfring commented Dec 27, 2022

Would you like to wrap any pointer data members with the class template “std::unique_ptr”?

@EndrII
Copy link
Member

EndrII commented Dec 27, 2022

Good suggestion, but I don't care.

The Code of this utility is very simple and not required smart pointers.
If you want to change raw pointers to the smart pointer, make a pull request and use the QSharedPointer instead of the std::unique_ptr, because the unique_ptr works only with move semantic and not calculate references count to an object.

In this case, object are passed into constructors other inner objects of main class. So you should be use QSharedPointer.

@EndrII EndrII added the Enhancement New feature or request label Dec 27, 2022
@EndrII EndrII added this to To do in qtDeployer via automation Dec 27, 2022
@EndrII EndrII added this to the v1.6 milestone Dec 27, 2022
@EndrII
Copy link
Member

EndrII commented Dec 27, 2022

I assign this issue to you.
So if you want help project, move it to smart pointers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
No open projects
qtDeployer
  
To do
Development

No branches or pull requests

2 participants