Skip to content

Conversation

@jamesmulcahy
Copy link

Fixes #1

Choose a reason for hiding this comment

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

This is unsafe. You should not be managing raw pointers in your class.
If you use std::unique_ptr it will solve this problem.
As it stands this class is broken because it does not implement the rule of three/five (ie there is no assignment operator). So you still have potential malloc errors (though I hope there are no mallocs in your code)

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.

Use of default copy constructor causes SEGVs

2 participants