Can we call the Garbage Collector explicitly? [duplicate]
问题 This question already has answers here : Why is it bad practice to call System.gc()? (13 answers) Closed 6 years ago . My application has lot of iterations. Till now I haven't faced any memory issues. But from code level I can suspect there are few places, which causes memory leaks and out of memory problem. I am thinking of calling garbage collector manually. Is it good practice to call Garbage Collector manually? 回答1: You can call Garbage collector using: System.gc(); But this does not mean