V2EX  ›  英汉词典

Nullpointer

释义 Definition

(编程)“空指针”:指向“无效/不存在对象”的指针值,常见为 null / NULL / nullptr。对空指针解引用(访问其所指向的内存)通常会导致程序崩溃或抛出异常(如 NullPointerException)。该词也常指由空指针引发的错误。

发音 Pronunciation

/ˈnʌlˌpɔɪntər/

例句 Examples

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.
如果在调用方法前不检查空指针,程序可能在生产环境的罕见情况下出错。

词源 Etymology

null(“无、空”,源自拉丁语 nullus,意为“没有”)+ pointer(“指针”)组合而成,属于计算机科学语境中的复合词,用来描述“指向空值的指针”。

相关词 Related Words

文学与作品 Literary Works

  • The C Programming Language(Kernighan & Ritchie):讨论指针与空指针(NULL)的用法与边界条件。
  • Effective Java(Joshua Bloch):在 API 设计与空值处理相关内容中涉及空引用/空指针问题。
  • Clean Code(Robert C. Martin):在“防御式编程”“错误处理”等章节中讨论避免空值导致的缺陷。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2212 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 14ms · UTC 14:58 · PVG 22:58 · LAX 06:58 · JFK 09:58
♥ Do have faith in what you're doing.