Release java memory for OS at runtime.

前端 未结 5 1792
-上瘾入骨i
-上瘾入骨i 2020-12-07 01:58

Suppose I have a Swings Java Application, I set the min Heap is 64MB and max Heap 2GB, when the user start the application, the log in screen will be displayed, at this time

5条回答
  •  Happy的楠姐
    2020-12-07 02:40

    You can dispose of objects and suggest the garbage collector do its work, but if the GC does not feel it is necessary, the request will be ignored. So in summary, 'no'.

    Note that memory assigned to Java apps. is set before the app. starts, and is not adjustable.

提交回复
热议问题