开发者

Help with a c++ statement

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜