只要有可能,应该避免创建对象,防止调用构造函数带来的相关性能成本,以及在对象结束其生命周期时进行垃圾收集所带来的成本。
Whenever possible, avoid creating objects to prevent associated performance costs of calling the constructor, and subsequent cost of GC when an object reaches the end of its lifecycle.
应该在main方法结束的地方、调用任何启动生命周期方法之前调用lock方法锁定服务定位器,这样可以有效地防止误用。
That lock method would be called at the end of the main method before any start lifecycle were invoked and would very effectively prevent misuse.
可治理可以在从创建到升级直至使用寿命结束的整个生命周期中对它们进行管理和版本控制。
Governable They can be managed and versioned through their life cycles from creation through upgrades and end of life.
应用推荐