dangling object
常見例句
- A dangling alias occurs when two classes each think (mistakenly) that they hold the only writeable reference to a given object.
儅兩個(gè)類都(錯(cuò)誤地)認(rèn)爲(wèi)自己保存有對(duì)給定對(duì)象的惟一可寫的引用時(shí),就會(huì)出現(xiàn)懸空指針。 - To avoid dangling pointers (the dangerous situation where a block of memory is freed but a pointer still references it), you must delete the object only after the last reference is released.
爲(wèi)了避免懸空指針(一種危險(xiǎn)的情況,即一塊內(nèi)存已經(jīng)被釋放了,而一個(gè)指針還在引用它),必須在最後的引用釋放之後才刪除對(duì)象。 返回 dangling object