终结器
- 网络finalizer;finalization;terminator;termination
-
但是如果props.load()方法抛出一个IOException,那么流则不会被关闭(直到垃圾收集器运行其终结器)。
Method throws an IOException , then the stream will not be closed ( until the garbage collector runs its finalizer ) .
-
如果终结器无法释放或销毁资源,此行为可以确保进程完整性。
This behavior ensures process integrity if the finalizer cannot free or destroy resources .
-
如果触发垃圾回收,然后将其挂起直至终结器完成,则上面的代码将更可靠地激活此mda。
The preceding code will activate this MDA more reliably if a garbage collection is triggered and then suspended until finalizers have finished .
-
对于其他对象,通常最好避免终结器。
For other objects , finalizers are generally best avoided .
-
用来运行对象终结器的线程。
A thread that is used to run object finalizers .
-
不要依赖于终结器作为释放资源的主要方式。
Don 't rely on finalizers as the primary means of releasing resources .
-
将外部输入、终结器或状态添加到数据流图表中。
Adds an external input , a terminator , or a state to your data flow diagram .
-
否则终结器似乎将在任意时间运行,并且可能在进程退出时根本就不运行。
Finalizers will otherwise run at seemingly arbitrary times , and possibly not at all on process exit .
-
从终结器方法引发的异常不会被捕捉到,并且会导致无法预料的结果。
Exceptions that are thrown from a finalizer method will not be caught , and can cause unexpected results .
-
回收可以清理终结器线程的资源,将清除代码位置在正确的位置仍很重要。
Recycling can clean up resources on the finalizer thread , it is still important to put cleanup code in the correct place .
-
在终结器中使用任何外部状态时,如向日志文件写入,必须处理线程处理问题。
When using any external state , such as writing to a log file , in a finalizer , threading issues must be handled .
-
此方法的缺点是,终结器的存在意味着对象的存活期比其他情况下更长。
The disadvantage of this approach is that the existence of the finalizer means that the object is kept alive longer than it otherwise would be .
-
原因有很多,最重要的一个原因是,终结器很难正确编写(并且很容易编写错)。
There are a number of reasons , foremost of which is that finalizers are very tricky to write correctly ( and very easy to write incorrectly ) .
-
终结器将其清理,则下次代码运行时,如果终结器尚未运行,访问该文件的尝试就可能失败。
Finalizer to clean it up , the next time your code runs it may fail trying to access the exact same file if the finalizer has not already run .
-
终结器不仅难以编写正确,终结的定时也是不确定的,并且不能保证终结器最终会运行。
Not only is it difficult to code them correctly , but the timing of finalization is not deterministic , and there is no guarantee that finalizers will ever even run .
-
一般来说,正常中止会在中止任务前尽一切力量来运行异常处理例程和终结器,而强制中止则没有这样的保证。
In general , a normal or graceful abort makes every effort to run exception-handling routines and finalizers before aborting a task , while a rude abort makes no such guarantees .
-
但是尽管文件句柄提供了终结器来在您忘记了时为您释放资源,最好还是在使用完之后显式地释放资源。
But even though file handles provide finalizers to clean up after you if you forget , it is still better to close them explicitly when you are done with them .
-
试用结果表明:采用预结晶器、终结晶器的双结晶器式结构可以方便实现半固态浆料的制备、运输和浇注成形,低压渗油技术可使终结晶器得到有效润滑。
It is shown from probation results that using double mold style with the pre-mold and the mold can realizes conveniently producing , transferring and casting the semi-solid slurry , and the mold can be lubricated by using the low-pressure oil penetrating technology .
-
终结点映射器中没有更多的终结点可用。
There are no more endpoints available from the endpoint mapper .