Skip to content

Conversation

@fhinkel
Copy link
Member

Use std::unique_ptr instead of raw pointers for the
tracing_agent_ in node.cc. This makes ownership clearer and we
don't risk a memory leak.

Checklist
Affected core subsystem(s)

src

@nodejs-github-botnodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Nov 14, 2017
Use std::unique_ptr instead of raw pointers for the tracing_agent_ in node.cc. This makes ownership clearer and we don't risk a memory leak.
@fhinkelfhinkelforce-pushed the nov/uniq_ptr_tracing_agent branch from 6d046bb to 0f96d04CompareNovember 14, 2017 09:04
@fhinkel
Copy link
MemberAuthor

@fhinkel
Copy link
MemberAuthor

Landed in 787863d.

@fhinkelfhinkel closed this Nov 16, 2017
fhinkel added a commit that referenced this pull request Nov 16, 2017
Use std::unique_ptr instead of raw pointers for the tracing_agent_ in node.cc. This makes ownership clearer and we don't risk a memory leak. PR-URL: #17012 Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Timothy Gu <[email protected]>
fhinkel added a commit that referenced this pull request Nov 17, 2017
Add rule for smart pointers, i.e., std::unique_ptr and std::shared_ptr, to the Cpp style guide. Mostly copied from the Google style guide. PR-URL: #17055 Ref: #16970 Ref: #16974 Ref: #17000 Ref: #17012 Ref: #17020 Ref: #17030 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
MylesBorins pushed a commit that referenced this pull request Dec 11, 2017
Use std::unique_ptr instead of raw pointers for the tracing_agent_ in node.cc. This makes ownership clearer and we don't risk a memory leak. PR-URL: #17012 Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Timothy Gu <[email protected]>
MylesBorins pushed a commit that referenced this pull request Dec 12, 2017
Add rule for smart pointers, i.e., std::unique_ptr and std::shared_ptr, to the Cpp style guide. Mostly copied from the Google style guide. PR-URL: #17055 Ref: #16970 Ref: #16974 Ref: #17000 Ref: #17012 Ref: #17020 Ref: #17030 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Dec 12, 2017
@gibfahn
Copy link
Member

gibfahn commented Dec 19, 2017

Should this be backported to v8.x-staging || v6.x-staging? If yes please follow the guide and raise a backport PR, if no let me know or add the dont-land-on label.

Doesn't land cleanly on v8.x.

gibfahn pushed a commit that referenced this pull request Dec 19, 2017
Add rule for smart pointers, i.e., std::unique_ptr and std::shared_ptr, to the Cpp style guide. Mostly copied from the Google style guide. PR-URL: #17055 Ref: #16970 Ref: #16974 Ref: #17000 Ref: #17012 Ref: #17020 Ref: #17030 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
gibfahn pushed a commit that referenced this pull request Dec 20, 2017
Add rule for smart pointers, i.e., std::unique_ptr and std::shared_ptr, to the Cpp style guide. Mostly copied from the Google style guide. PR-URL: #17055 Ref: #16970 Ref: #16974 Ref: #17000 Ref: #17012 Ref: #17020 Ref: #17030 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
@AndreasMadsenAndreasMadsen mentioned this pull request Jan 16, 2018
4 tasks
gibfahn pushed a commit to gibfahn/node that referenced this pull request Jan 17, 2018
Use std::unique_ptr instead of raw pointers for the tracing_agent_ in node.cc. This makes ownership clearer and we don't risk a memory leak. PR-URL: nodejs#17012 Backport-PR-URL: nodejs#18179 Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Timothy Gu <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jan 19, 2018
Use std::unique_ptr instead of raw pointers for the tracing_agent_ in node.cc. This makes ownership clearer and we don't risk a memory leak. Backport-PR-URL: #18179 PR-URL: #17012 Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Timothy Gu <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++Issues and PRs that require attention from people who are familiar with C++.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@fhinkel@gibfahn@danbev@jasnell@TimothyGu@cjihrig@MylesBorins@BethGriggs@nodejs-github-bot