(编程)“空指针”:指向“无效/不存在对象”的指针值,常见为 null / NULL / nullptr。对空指针解引用(访问其所指向的内存)通常会导致程序崩溃或抛出异常(如 NullPointerException)。该词也常指由空指针引发的错误。
/ˈnʌlˌpɔɪntər/
The app crashed because of a nullpointer.
应用因为空指针而崩溃了。
If you don’t check for a nullpointer before calling the method, the program may fail in production under rare conditions.
如果在调用方法前不检查空指针,程序可能在生产环境的罕见情况下出错。
由 null(“无、空”,源自拉丁语 nullus,意为“没有”)+ pointer(“指针”)组合而成,属于计算机科学语境中的复合词,用来描述“指向空值的指针”。