Skip to content

locale allocation in std::basic_streambuf #5233

Closed Answered by StephanTLavavej
Dramcryx asked this question in Q&A
Discussion options

You must be logged in to vote

I see that for debug builds new for locale objects is overridden with malloc/free but what about release builds?

It's not overridden for release builds. We use global new/delete normally.

So how safe is that to go with derivation of std::streambuf?

I don't understand the question.

Are there any ABI or other historical reasons which required locale in std::streambuf to be allocated with new rather than default class member

Historical reason: That's the way that Dinkumware, the original authors of our STL implementation, did it. Their rationale is lost to time.

ABI: Because this affects the representation of std::streambuf, we are utterly unable to change how this works in the v14 (VS…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by StephanTLavavej
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants