Skip to content

fix: Crash when building with /MT in MSVC (double-destructor) #1276#1277

Merged
COM8 merged 1 commit into
libcpr:masterfrom
ZeroKwok:master
Nov 27, 2025
Merged

fix: Crash when building with /MT in MSVC (double-destructor) #1276#1277
COM8 merged 1 commit into
libcpr:masterfrom
ZeroKwok:master

Conversation

@ZeroKwok

Copy link
Copy Markdown
Contributor

Fix for #1276

Use a function-local static rather than inline global objects to avoid the 'double-destructor' problem in MSVC when using /MT flags.

@COM8 COM8 added the Bug 🐛 label Nov 27, 2025
@COM8 COM8 self-requested a review November 27, 2025 11:04
@COM8 COM8 linked an issue Nov 27, 2025 that may be closed by this pull request

@COM8 COM8 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @ZeroKwok!

@COM8 COM8 merged commit 570e989 into libcpr:master Nov 27, 2025
34 of 37 checks passed
@COM8

COM8 commented Nov 27, 2025

Copy link
Copy Markdown
Member

I will try to create a patch release once I validated the NuGet stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash when building with /MT in MSVC (double-destructor)

2 participants