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

Check if we need to manage the copy constructors and assignment operator (operator=) if we have member variables that are pointers #38

Open
dmultiply opened this issue Jan 12, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@dmultiply
Copy link
Owner

If member variables are pointers, a copy of an object of the class, or an assignement to another object, may make two objects point to the same member object.
It may lead to wrong behavior, and to failure if the objects are created with new in the constructor.
When delete is called in the destructor, there may be a program failure

@dmultiply dmultiply added the enhancement New feature or request label Jan 12, 2023
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
None yet
Development

No branches or pull requests

1 participant