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 #428

Closed
DlubalSmidJaroslav opened this issue Jan 10, 2022 · 1 comment · Fixed by #430
Closed

Memory leak #428

DlubalSmidJaroslav opened this issue Jan 10, 2022 · 1 comment · Fixed by #430
Labels

Comments

@DlubalSmidJaroslav
Copy link
Contributor

Describe the bug
filesinkhelper.ipp, function g3::internal::createLogFile, in the failure cause, unique_ptr::release is called instead of unique_ptr::reset, which leaks the allocated std::ofstream object - release returns the internal pointer and sets unique_ptr to nullptr WITHOUT deleting the object (i.e. transfers ownership).
See here for reference.

@KjellKod
Copy link
Owner

Good find. In this error case it should of course do reset. Please create a pull request that addresses this issue.

g3log is community driven

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants