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

Ownership with SetLogger #524

Closed
geoffviola opened this issue Feb 9, 2020 · 1 comment
Closed

Ownership with SetLogger #524

geoffviola opened this issue Feb 9, 2020 · 1 comment
Labels

Comments

@geoffviola
Copy link

It seems like the comments on the base::SetLogger function is incorrect. It says

The logger ... should not be deleted by the caller

Meanwhile, the unit tests use a logger that is put on the stack. As far as I can tell from logging.cc, base::SetLogger sets LogDestination's logger_ member variable and it is not deleted there.

It seems like the caller still owns the logger after the base::SetLogger call. So if the caller new'd the logger, it's expected that the caller also calls delete on the logger.

@sergiud sergiud added the bug label Mar 25, 2020
@sergiud
Copy link
Collaborator

sergiud commented Mar 25, 2020

Should be fixed by #503. Reopen if still an issue.

@sergiud sergiud closed this as completed Mar 25, 2020
@sergiud sergiud mentioned this issue May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants