惰性初始化(lazy initialization)的属性,必须通过属性来读取数据。因为惰性初始化是通过重写get方法来初始化实例变量的,如果不通过属性来读取该实例变量,那么这...
基于66个网页-相关网页
该模式和类似的技术有时称为“惰性初始化”,原因是在实际需要之前不执行初始化。
This pattern and similar techniques are sometimes called lazy initialization, since the initialization is not performed until actually required.
在很多情况下,当初始化可以作为针对对象的第一个请求的一部分发生时,惰性初始化很有用。
Lazy initialization is quite useful in a number of scenarios when the initialization can occur as part of the first request to an object.
希望您的代码设计为惰性,这样初始化就变得不重要。
With hope, your code is designed to be lazy and this initialization is not important.
应用推荐