Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译!

An immutable object is one whose content cannot be changed.
An object can be immutable for various reasons, for example:

  • To improve performance (no planning for the object's future changes)
  • To reduce memory use (make object references instead of cloning the whole object)
  • Thread-safety (multiple threads can reference the same object without interfering with one other)

Learn more

General knowledge

文档标签和贡献者

 此页面的贡献者: lpiot, Andrew_Pfeiffer, klez, hbloomer, kscarfone, panaggio
 最后编辑者: lpiot,