堆和免费商店之间有什么区别? [英] What is the difference between the heap and the free store?
问题描述
最初在@Als上的战术战争回答了这里,它也引发了C ++聊天室中的讨论。
此Article 由Herb Sutter进行区分,但也有十多年的历史,因为它明显是在2000年之前编写的,并且谈论标准草案,这只能意味着C ++ 98草案。虽然,我仍然期望Herb作为委员会的一部分,了解这个东西。
我知道 this 和这个问题/答案,但第二个只是引用Herb的文章,而第一个引用另一个来源,只是拒绝使用术语堆都不完全令人满意。此外,我找不到任何免费店
或 freestore
标签上SO(直到这个问题,我创建了
现在的C ++标准只使用术语free store - 标准中heap的唯一用法是描述标准库中的堆数据结构。所以当试图准确讨论C ++问题时,堆不是一个非常有用的术语,虽然当然每个人都这样做。
Originally a pedantics war on @Als answer here, it also sparked a discussion in the C++ chatroom.
This article by Herb Sutter distinguishes between the two, but is also over a decade old, as it clearly was written before 2000 and also talks about the standard draft, which can only mean C++98 draft. Though, I still expect Herb, as part of the committee, to be knowledgeable about this stuff.
I know of this and this question/answer, but the second just cites Herb's article while the first cites another source that simply rejects the use of the term "heap", aka they are both not exactly satisfactory. Also, I can't find any free-store
or freestore
tag on SO (until this question, I created the former one now).
Now, what is really the difference, if any?
Well, the current C++ standard only uses the term "free store" - the only use of "heap" in the Standard is to describe the heap data structure in the Standard Library. So "heap" is not a very useful term to use when trying to discuss C++ problems accurately, though of course everyone does it.
这篇关于堆和免费商店之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!