Skip to content

Avoid use of magic static in C++/WinRT factory cache#470

Merged
kennykerr merged 2 commits into
masterfrom
kennykerr-magic
Jun 6, 2019
Merged

Avoid use of magic static in C++/WinRT factory cache#470
kennykerr merged 2 commits into
masterfrom
kennykerr-magic

Conversation

@kennykerr

Copy link
Copy Markdown
Contributor

The use of magic statics can impact the performance of system DLLs due to frequent THREAD_ATTACH/THREAD_DETATCH calls. Fortunately, a magic static is not required in this case because InitializeSListHead just zero-initializes the SLIST_HEADER on all supported platforms.

Tested with: cl /Zc:threadSafeInit- /we4640

OS bug: 21988886

@kennykerr kennykerr merged commit e3166fb into master Jun 6, 2019
@kennykerr kennykerr deleted the kennykerr-magic branch June 6, 2019 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants