+ 2

Does gabage collection still exist in java?

If so why I dont see this concept in SoloLearn.

20th Jul 2016, 8:03 PM
WPimpong
WPimpong - avatar
3 Réponses
+ 2
Yes java has garbage collection. You don't see it because you can not control it. Languages that allow you to manage garbage collection like C run directly within the OS this your program can access and manage the memory. a java program runs in a virtual machine, the virtual machine controls memory and back-end duties like garbage collection.
21st Jul 2016, 12:05 AM
Dwayne Barsotta
Dwayne Barsotta - avatar
+ 2
You can actually 'request' garbage collection using the System.gc() call but it's hardly practical for many applications since its not guaranteed, your JVM has absolute control over GC but using the above system call tells the JVM to attempt GC but again, the JVM will do so at its disposal.
21st Jul 2016, 3:41 AM
Eric Gitangu
Eric Gitangu - avatar
+ 1
I'm sorry, but you don't see many basic topics in this course. It's not bad at all like a basic intro, but it have so many big missings in my opinion.
22nd Jul 2016, 10:25 PM
gorlok