开发者

Help with a c++ statement

开发者 https://www.devze.com 2023-04-09 09:37 出处:网络
The following statement is from WebKit. I am not 100% sure what it mea开发者_运维问答ns. Any clues?

The following statement is from WebKit. I am not 100% sure what it mea开发者_运维问答ns. Any clues?

new ((void*)&nullAtom) AtomicString;


It's a placement-new. It means that the AtomicString object will be constructed at the memory location pointed to inside the parentheses (&nullAtom), rather than the usual behavior (constructed on top of a bit of memory taken off of the heap).


That's a "placement new".

0

精彩评论

暂无评论...
验证码 换一张
取 消