Skip to content

Update template-specialization-cpp.md #3223

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

Merged
merged 2 commits into from
Jul 9, 2021
Merged

Update template-specialization-cpp.md #3223

merged 2 commits into from
Jul 9, 2021

Conversation

jaigak
Copy link
Contributor

@jaigak jaigak commented Jun 27, 2021

Adds the delete statement for showcasing good practice.

@PRMerger13
Copy link
Contributor

@Jaiganeshkumaran : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Switch to stack-based objects.
@PRMerger15
Copy link
Contributor

@corob-msft : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Copy link
Contributor

@colin-home colin-home left a comment

Choose a reason for hiding this comment

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

@Jaiganeshkumaran Thanks for the update and for bringing the leaky code to my attention. Rather than use heap objects, I edited your changes to use Modern stack-based style, so the objects are deleted when they go out of scope. I also updated the template parameters to match the current C++ string literal definitions. This code would have remained broken without your submission.

@colin-home colin-home merged commit f92e24f into MicrosoftDocs:master Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants