diff options
| author | WeiN76LQh <WeiN76LQh@github.com> | 2024-11-26 18:21:14 +0000 |
|---|---|---|
| committer | kat <kat@vector35.com> | 2025-02-10 10:33:20 -0500 |
| commit | 0f0801ac9fc2196b568bd6c4a5fb3f16a928c2d3 (patch) | |
| tree | c68bb505be3aaa6df16862ec89cd8775f5c8b3b0 /unicode.cpp | |
| parent | 876a5e2f8eeea13dd4aed5bbf7abc853727dcc85 (diff) | |
[SharedCache] Make `m_exportInfos` map's values a `shared_ptr`
This avoids expensive copying when returning a value from the map in `SharedCache::GetExportListForHeader`. Additionally it ensures that the value stays alive and at the same location in memory if `m_exportInfos` is modified and requires its storage to be re-allocated.
I was unable to use a `unique_ptr` instead of a `shared_ptr` because of copy semantics with `m_exportInfos` in `ViewStateCacheStore`. I don't see things being any worse using `shared_ptr` instead of `unique_ptr` anyway and it means less code changes.
Diffstat (limited to 'unicode.cpp')
0 files changed, 0 insertions, 0 deletions
