| 1. | Method handles resource release 方法处理资源释放。 |
| 2. | However , the " obvious " way to clean up , shown in listing 3 , doesn t work 然而,进行资源释放的“明显的”方式并不起作用,如清单3所示: |
| 3. | Return value which may be set to false if a catastrophic error is encountered which prevents release of the resource 返回值,如果遇到阻止资源释放的灾难性错误,该值会被设置为 |
| 4. | Can detect some instances of improper resource release , such as opening a stream in a method and not closing it )这样的代码审查工具可以检测出不适当的资源释放的一些实例,比如在一个方法中打开一个流却不关闭它。 |
| 5. | Even later , when your service program receives a termination notice from the operating system or grid middleware , it should free up its resources 即便是稍后您的服务程序收到了操作系统或网格中间件发来的终止通知,它也应该将自己使用的资源释放掉。 |
| 6. | A key technique for ensuring timely resource release is to maintain a strict hierarchy of ownership ; with ownership comes the responsibility to release the resource 确保及时的资源释放的一个关键技巧是维护所有权的一个严格层次结构,其中的所有权具有释放资源的职责。 |
| 7. | For the majority of the objects that your application creates , you can rely on the garbage collector to automatically perform the necessary memory management tasks 为非托管资源释放内存对于应用程序创建的大多数对象,可以依赖垃圾回收器自动执行必要的内存管理任务。 |
| 8. | If a process that is holding some resources requests another resource that can not be immediately allocated to it , then all resources currently being held are preempted ( released ) 只要某个处理元要不到所要求的资源时,便把它已经拥有的资源释放,然后再重新要求所要资源。 |