The finally block ensures that the object is returned to the pool even if an exception occurs.
Finally块确保了即使发生异常,也会将对象返回到池中。
In that scenario, the finally never runs so the lock leaks, probably eventually deadlocking the program.
在这样的情形下,finally不会执行,那么也就产生了程序锁泄漏,程序有可能出现死锁。
Fortunately, all of these are handled by the finally clause, which releases all the resources used by copyFile .
幸运的是,所有这些都由finally语句来处理,该语句释放了copyFile所使用的所有资源。
It is possible for an exception to occur that forces a branch to the finally clause of the lock statement, releasing the lock and allowing access to any waiting thread to the corrupted resource.
强行进入lock语句的finally子句、释放锁以及允许访问任意等待线程(该线程占用了已被破坏的资源),都有可能引发异常。
火焰终于减弱了。
The regime finally collapsed after 25 years of misrule.
在施行了25年的蠹政后,这个政权最终垮台。
The action slips from comedy to melodrama and finally to tragedy.
剧情由喜剧慢慢发展成闹剧,最后又演变为悲剧。
The bitter arguments and recriminations have finally ended the relationship.
充满仇恨的争吵和互相指责最终结束了这段关系。
The irony is that when he finally got the job, he discovered he didn't like it.
讽刺的是,当他最终得到那份工作时,他发现自己并不喜欢它。
Police finally managed to overpower the gunman.
警察最终制伏了持枪歹徒。
He killed 12 people before the authorities finally nabbed him.
他杀了12个人之后才最终被当局抓获。
Racial tension finally boiled over in the inner city riots.
种族间的紧张状态最终演化成了市中心贫困区的暴乱。
They were finally forced to capitulate to the terrorists' demands.
他们最后被迫屈从恐怖分子的要求。
His temperature continued to rise and the cough worsened until Tania finally persuaded him to see a doctor.
他的体温持续升高且咳嗽加重,直到塔妮娅最终说服了他去看医生。
She eventually used a cane, then a walker, and finally was confined to the house.
结果她拄上了拐杖,之后又用上了步行器,最后连房门都出不了了。
A United Nations aid convoy loaded with food and medicine finally got through to the besieged town.
一支联合国援助车队载着食物和药物终于抵达了被围困的市镇。
I finally managed to whittle down the names on the list to only five.
我最后总算把名单上的名字减少到了只有五个。
The stranded tourists were finally flown home.
受困的游客终于由飞机送返家园。
After 15 years in the U.S., he has finally decided to apply for American citizenship.
在美国住了15年后,他最终决定申请美国的公民身份。
She finally found the perfect gown, a beautiful creation trimmed with lace.
她最终找到了那件完美的大衣,款式漂亮、饰有花边。
Steve finally coughed up the money he owed us.
史蒂夫最终勉强归还了他欠我们的钱。
Four days later, the despised leader finally stood down, just 17 days after taking office.
4天后,这位受鄙视的领导人终于辞职了,就职才只有17天。
The wall through Berlin was finally ruptured, prefiguring the reunification of Germany.
柏林墙终于倒塌了,预示着德国的重新统一。
After lengthy talks the two sides finally reached a compromise.
双方经过长期的商谈终于达成了妥协。
Party activists in New Hampshire rejoiced that the presidential campaign had finally started.
新罕布什尔州的党派积极分子们为总统竞选活动终于开始而欣喜。
He was finally forced off the political stage last year by the deterioration of his physical condition.
他最终因身体状况恶化于去年被迫离开了政治舞台。
I bought into the popular myth that when I got the new car or the next house, I'd finally be happy.
我相信了这种大众神话,以为只要买上新车或再买栋房子就会最终幸福起来。
So it is possible that the symptoms will not finally go until your nervous system is in a better state.
可能这些症状不会彻底消失,除非你的神经系统有所改善。
Finally, the Bolsheviks signed an armistice with Germany.
布尔什维克最终与德国签署了停战协议。
Finally, the Bolsheviks signed an armistice with Germany.
布尔什维克最终与德国签署了停战协议。
应用推荐