Java: Garbage Collector Avoid OutOfMemory?

Community ForumCategory: JavaJava: Garbage Collector Avoid OutOfMemory?
matheusdba Staff asked 3 years ago

Does the garbage collector guarantees that the program will not run out of memory?

1 Answers
matheusdba Staff answered 3 years ago

Garbage collection does not guarantee that a program will not run out of memory. It is possible for programs to use up memory resources faster than they are garbage collected. It is also possible for programs to create objects that are not subject to garbage collection.