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

Memory leak in ResultInfo::operator =() #1

Closed
philsquared opened this issue Nov 11, 2010 · 3 comments
Closed

Memory leak in ResultInfo::operator =() #1

philsquared opened this issue Nov 11, 2010 · 3 comments

Comments

@philsquared
Copy link
Collaborator

The TestCase pointer member recieves a clone of the incoming, but if it already pointed at something else it leaks.

Op= should be implemented in terms of copy & swap anyway.

Thanks to Sam Saariste for spotting this one.

@ssaariste
Copy link

The issue is in TestCaseInfo::operator=() not in ResultInfo.

@philsquared
Copy link
Collaborator Author

That's what happens when you do this stuff without the code in front of you. Thanks again

@philsquared
Copy link
Collaborator Author

Fixed. Now does copy & swap

nanoant pushed a commit to ujhpc/Catch that referenced this issue Nov 17, 2013
oneof_reader::operator() is searching alt for an input string `s'.
alpereira7 added a commit to alpereira7/Catch2 that referenced this issue Jul 9, 2018
dmsteck pushed a commit to dmsteck/Catch2 that referenced this issue May 3, 2020
This issue was closed.
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

No branches or pull requests

2 participants