看板 java 關於我們 聯絡資訊
因為java沒有destructor 而且不能保證物件何時被release掉 所以不能像c++一樣用物件管理資源 JSE 7 以後新增了 try-with-resources Statement http://www.javacodegeeks.com/2011/07/java-7-try-with-resources-explained.html 可以少寫一些東西.... 或是用這個 Execute Around Pattern http://stackoverflow.com/questions/341971 如果你很堅持的話...自己實作reference count -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.104.186.35 ※ 編輯: aleelyle 來自: 59.104.186.35 (06/12 20:35) ※ 編輯: aleelyle 來自: 59.104.186.35 (06/12 20:36)
LaPass:謝謝資訊,我研究看看 06/13 13:58