V2EX  ›  英汉词典

Dereference

Definition / 定义

(计算机/编程)解引用:通过指针或引用获取其所指向的内存地址中的实际值(或对象)。常见于 C/C++ 等语言;在其他语境中也可泛指“根据某种引用去取到被引用的内容”。

Pronunciation / 发音

/ˌdiːˈrɛfərəns/

Examples / 例句

Please check that the pointer is not null before you dereference it.
在解引用指针之前,请先检查它是否为 null(空指针)。

If you dereference an invalid pointer, the program may crash or behave unpredictably.
如果你解引用了无效指针,程序可能崩溃或出现不可预测的行为。

Etymology / 词源

由 **de-**(加强或表示“执行某动作”)+ reference(引用)构成,字面可理解为“把引用指向的内容取出来”。在编程语境中逐渐固定为“对指针/引用取值”的术语。

Related Words / 相关词

Literary Works / 文学作品

  • The C Programming Language(Kernighan & Ritchie)
  • The C++ Programming Language(Bjarne Stroustrup)
  • *Effective C++*(Scott Meyers)
  • Structure and Interpretation of Computer Programs(Abelson & Sussman)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   3648 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 8ms · UTC 06:47 · PVG 14:47 · LAX 22:47 · JFK 01:47
♥ Do have faith in what you're doing.