Force garbage collection with command line dump tool


i used to take remote snapshots but they removed this feature and now im supposed to use the command line tool on the server itself, thats not a problem but how do i "force garbage collection" before taking the snapshot? there used to be a button for that.


Malte Krüger

1 comment
Comment actions Permalink


You don't need to force GC manually before taking a snapshot because dotMemory calls full GC from native code to collect snapshot whether you take it from command line or from dotMemory UI. Thus, memory snapshot contains only the objects remained in memory after GC.

Could you please describe in details your use case if you need to force GC from console for any other purposes?


Please sign in to leave a comment.