Why would you ever implement finalize()?

前端 未结 21 2640
耶瑟儿~
耶瑟儿~ 2020-11-22 16:50

I\'ve been reading through a lot of the rookie Java questions on finalize() and find it kind of bewildering that no one has really made it plain that finalize()

21条回答
  •  时光取名叫无心
    2020-11-22 17:42

    iirc - you can use finalize method as a means of implementing a pooling mechanism for expensive resources - so they don't get GC's too.

提交回复
热议问题