"Enterprise Java Performance"?
不明白.
请问大虾能不能说的更清楚一点?多谢.

解决方案 »

  1.   

    gc does not guarantee garbage collection. It's more like yield().normally, gc algorithm will run smartly, you can't be smarter than it.
    but it won't cause any problem except you'll end up with useless System.gc() everywhere.
      

  2.   

    http://www.pearsonptg.com/book_detail/0,3771,0130172960,00.html
    有介绍Enterprise Java Performance的书。
      

  3.   

    GC看上去好象对程序员降低要求,但这是从低层次的开发来说的,
    实际在高性能的程序上,要求程序员更多,GC的机制已存在了,你只能应用它,硬调system.gc()是不管用的,关键在于
    1,要注意对象的生存周期
    2,要注意不要过多的相互引用
    3,要灵活的运用弱引用(WeakReference),这是最有效的手段
      

  4.   

    2,要注意不要过多的相互引用
       normally, if your app is complex enough, the objects will form a graph. it's not practical to attempt to avoid mutual ref.
    And, mordern gc is using copying gc algorithm, which, is not affected by mutual ref at all.3,要灵活的运用弱引用(WeakReference),这是最有效的手段
       besides some flyweight/pool, really cannot see why weak reference is effective. normally you don't need it at all.