finalizers
美
英 
- 網(wǎng)絡(luò)析構(gòu)函數(shù);終止式
例句
Likewise, finalizers are normally processed as a background task, so their cost is usually amortized across the system's idle time.
同樣,終結(jié)通常是后臺(tái)任務(wù),所以它們常常在系統(tǒng)的空閑時(shí)間執(zhí)行。
Review your finalizers carefully to ensure that even if they do not run , a critical operating system resource is not leaked .
仔細(xì)檢查終結(jié)器,確保即使不運(yùn)行這些它們也不會(huì)泄漏重要的操作系統(tǒng)資源。
The finalizers are called on objects that are no longer live during the same garbage collection pass .
將對(duì)在同一垃圾回收傳遞期間不再活動(dòng)的對(duì)象調(diào)用終結(jié)器。
If you see objects queued for finalization in the verbose GC logs, try to rewrite the application to eliminate the use of finalizers.
如果在verboseGC日志中看到等待收尾的對(duì)象,那么請(qǐng)嘗試重寫(xiě)應(yīng)用程序以消除收尾器的使用。
Don't rely on finalizers as the primary means of releasing resources.
不要依賴于終結(jié)器作為釋放資源的主要方式。
There are a number of reasons, foremost of which is that finalizers are very tricky to write correctly (and very easy to write incorrectly).
原因有很多,最重要的一個(gè)原因是,終結(jié)器很難正確編寫(xiě)(并且很容易編寫(xiě)錯(cuò))。
Finalizers can cause a vulnerability in Java code when used to create objects.
在使用終結(jié)器(finalizer)來(lái)創(chuàng)建對(duì)象時(shí),其可能會(huì)給Java代碼帶來(lái)漏洞。
Finalizers have a significant performance cost, and they are not guaranteed to run in a predictable amount of time (or even at all).
Finalizer需要犧牲很多性能,并且它們不能(甚至完全不能)保證在預(yù)計(jì)的時(shí)間段運(yùn)行。
Methods with parameters are not class finalizers (in fact, a rule should be written to report these as invalid).
擁有參數(shù)的方法不是類(lèi)終結(jié)者(實(shí)際上,一個(gè)規(guī)則應(yīng)當(dāng)將這些報(bào)告為非法的)。
Notice that the objects that require finalizers stay in memory for extra cycles .
注意,要求終結(jié)器的對(duì)象會(huì)在內(nèi)存中多停留一個(gè)額外的周期。
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將每個(gè)準(zhǔn)備要終結(jié)的對(duì)象放在一個(gè)隊(duì)列里面,生成另一個(gè)線程來(lái)執(zhí)行所有的終結(jié)器。
Finalizers are not executed by the same thread that collects garbage.
執(zhí)行終結(jié)器的線程和收集垃圾的線程不是同一個(gè)。
at this time , it cannot collect the inaccessible objects that do have finalizers.
這時(shí),它不能回收具有終結(jié)器的不可訪問(wèn)對(duì)象。
For other objects, finalizers are generally best avoided.
對(duì)于其他對(duì)象,通常最好避免終結(jié)器。
Analyze the use of finalizers, including the number of finalizers executed.
分析終結(jié)(finalizer)的使用,和他們的執(zhí)行次數(shù)
The jmap tool is useful in diagnosing excessive use of finalizers, which can result in an OutOfMemoryError.
jmap工具可檢測(cè)出是否過(guò)度使用了完成器,后者可導(dǎo)致出現(xiàn)OutOfMemoryError錯(cuò)誤。
Whenever you can, avoid finalizers because of the additional performance overhead that is involved in tracking object lifetime.
應(yīng)盡可能避免終結(jié)器,因?yàn)?/c>跟蹤對(duì)象生存期會(huì)產(chǎn)生額外的性能系統(tǒng)開(kāi)銷(xiāo)。
Still, there are times when you need to use finalizers, and there are a number of errors you can make when doing so.
仍然有些時(shí)候需要使用finalizer,而這樣做的過(guò)程中可能產(chǎn)生很多錯(cuò)誤。