-
Notifications
You must be signed in to change notification settings - Fork 540
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
Avoid unnecessary std::shared_ptr copies #4212
Avoid unnecessary std::shared_ptr copies #4212
Conversation
…ue, to avoid unnecessary reference count changes.
…com/chriche-ms/AdaptiveCards into chriche/uwp_performance_sharedmodel
@almedina-ms is added to the review. #Closed |
@paulcam206 is added to the review. #Closed |
@RebeccaAnne is added to the review. #Closed |
Hi @chriche-ms. This non-spec pull request has had no recent activity for the past 5 days . Please take the necessary actions (review, address feedback or commit if reviewed already) to move this along. |
…com/chriche-ms/AdaptiveCards into chriche/uwp_performance_sharedmodel
Hi @chriche-ms; Thanks for taking action on your previously stale pull request. Resetting staleness. |
…com/chriche-ms/AdaptiveCards into chriche/uwp_performance_sharedmodel
Hi @chriche-ms. This non-spec pull request has had no recent activity for the past 5 days . Please take the necessary actions (review, address feedback or commit if reviewed already) to move this along. |
Hi @paulcam206; Thanks for reviewing this previously stale pull request. Resetting staleness. @chriche-ms FYI. |
* Change std::shared_ptr parameters to be const-ref, rather than by value, to avoid unnecessary reference count changes. * Update GetSharedModel and related function to minimize shared_ptr ownership changes * Update Java interop code Co-authored-by: shalinijoshi19 <shalinij@microsoft.com> Co-authored-by: Paul Campbell <paulcam@microsoft.com>
Related Issue
Resolves #4211
Description
This PR updates various frequently called functions in order to minimize the frequency with which ownership of various std::shared_ptr variables is shared. Instead the variables are either passed by reference (instead of by value) or ownership is transferred using std::move.
How Verified
Existing unit tests were successfully run.
Microsoft Reviewers: Open in CodeFlow