Header Ads

  • Breaking Now

    Should one pool objects to help GC? Should one call System.gc() periodically?

    The answer is No!

    Pooling objects will cause them to live longer than necessary. The garbage collection methods will be much more efficient if you let it do the memory management. The strong advice is taking out object pools.

    Don't call System.gc(), HotSpot will make the determination of when its appropriate and will generally do a much better job.

    No comments

    Post Top Ad

    Post Bottom Ad