finalizers

finalizers

 英

  • 网络析构函数;终止式

例句

Likewise, finalizers are normally processed as a background task, so their cost is usually amortized across the system's idle time.

同样终结通常后台任务所以它们常常系统空闲时间执行

Review your finalizers carefully to ensure that even if they do not run , a critical operating system resource is not leaked .

仔细检查终结确保即使运行这些它们不会泄漏重要操作系统资源

The finalizers are called on objects that are no longer live during the same garbage collection pass .

同一垃圾回收传递期间不再活动对象调用终结

If you see objects queued for finalization in the verbose GC logs, try to rewrite the application to eliminate the use of finalizers.

如果verboseGC日志看到等待收尾对象那么尝试重写应用程序消除收尾使用

Don't rely on finalizers as the primary means of releasing resources.

不要依赖终结作为释放资源主要方式

There are a number of reasons, foremost of which is that finalizers are very tricky to write correctly (and very easy to write incorrectly).

原因很多重要一个原因终结很难正确编写并且容易编写)。

Finalizers can cause a vulnerability in Java code when used to create objects.

使用终结finalizer创建对象可能会Java代码带来漏洞

Finalizers have a significant performance cost, and they are not guaranteed to run in a predictable amount of time (or even at all).

Finalizer需要牺牲很多性能并且它们不能甚至完全不能保证预计时间运行

Methods with parameters are not class finalizers (in fact, a rule should be written to report these as invalid).

拥有参数方法不是终结实际上一个规则应当这些报告非法)。

Notice that the objects that require finalizers stay in memory for extra cycles .

注意要求终结对象内存停留一个额外周期

Instead, the GC places each object that is ready for finalization in a queue and spawns yet another thread to execute all the finalizers.

相反GC每个准备终结对象一个队列里面生成另一个线程执行所有终结

Finalizers are not executed by the same thread that collects garbage.

执行终结线程收集垃圾线程不是同一

at this time , it cannot collect the inaccessible objects that do have finalizers.

这时不能回收具有终结不可访问对象

For other objects, finalizers are generally best avoided.

对于其他对象通常最好避免终结

Analyze the use of finalizers, including the number of finalizers executed.

分析终结finalizer使用他们执行次数

The jmap tool is useful in diagnosing excessive use of finalizers, which can result in an OutOfMemoryError.

jmap工具检测是否过度使用完成后者导致出现OutOfMemoryError错误

Whenever you can, avoid finalizers because of the additional performance overhead that is involved in tracking object lifetime.

尽可能避免终结因为跟踪对象生存期产生额外性能系统开销

Still, there are times when you need to use finalizers, and there are a number of errors you can make when doing so.

仍然有些时候需要使用finalizer这样过程可能产生很多错误

热门查询