有JAVA高手帮小弟解释下下面的英文吗?

来源:百度知道 编辑:UC知道 时间:2024/09/28 13:34:39
Object creation & lifetime
One critical issue when working with object is the way are created and destroyed. Each object requires resource, most notably memory, in order to exist. When an abject is no longer needed it must be cleaned up so that these resources are released for reuse. In simple programming situations the question of how an object is cleaned up doesn’t seem too challenging: you create the object, use it for as long as it’s needed, and then it should be destroyed. However, it’s not hard to encounter situations that are more complex.

Suppose, for example, you are designing a system to manage air traffic for an airport. (The same model might also work for managing crates in a warehouse, or a video rental system, or a kennel for boarding pets.) At first it seems simple: make a container for each airplane and place it in the container for each airplane that enters the air-traffic-control zone. For cleanup, simply clean up the appropriate airplane object when a

然而也许你拥有一些其他的系统用来记录飞机的数据;或许数据不像主控功能那样要求很多实时性处理(及时关注,飞机嘛,实时性要求必然很高)。也许他是所有离开机场的小型飞机的飞行计划记录。所以如果是小飞机你有一个二级的/另外的容器。于是在这个容器中对于这些对象的操作的一些进程应该在系统空闲的时候进行

但或许您有某一其它系统记录数据关于飞机; 或许不要求如此直接关注象主要控制器作用的数据。可能这是所有小飞机的飞行计划的纪录离开机场。如此您有第二个容器如果这是一架小飞机。然后某一背景作用进行操作在对象在这个容器里在无所事事的片刻期间。