Java之建立物件>7.Avoid finalizers

FrankYou發表於2017-05-31

 

1.Finalizers are unpredictable, often dangerous, and generally unnecessary.

2.never do anything time-critical in a finalizer.

3.never depend on a finalizer to update critical persistent state

4.there is a severe performance penalty for using finalizers.

 

相關文章