As you know, the garbage collector is a thread in java. And each thread will have its own logic to execute. So I wanted to know what logic this garbage collector uses, which saves memory so well.
thank
An object is considered garbage when it can no longer be reached from any pointer in a running program. The simplest garbage collection algorithms simply iterate over every available object. Any remaining objects are then considered garbage. The time spent on this approach is proportional to the number of live objects, which is prohibitive for large applications that support a lot of live data.
5.0 Java [tm]
. Mark-and-Sweep. .
EDIT: , .
COM - . .NET . .
: , , , . .
: .NET , .
:
: 1. 2.
, , .
GC : , . GC ], .
GC , "". , GC , ( VB.NET) , . , GC , .
: DEAD
, , , , .
JVM , . , , .
To see the garbage collector start to work, add the -verbose: gc command line argument to your virtual machine.
A detailed article about the garbage collector can be found here: Configuring the garbage collection with the Java Virtual Machine 5.0
Source: https://habr.com/ru/post/1788107/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1788102/examples-to-show-how-to-use-racket-lexer-generator&usg=ALkJrhgwgKopO8NEVekQjoJah1j6E2xA0AHelp understand how brackets are used ... Rookie Question - phpandroid - UI like a sliding notification bar - androidMongomapper: does the "_id" field conflict with "id"? - mongodbGarbage collection java - javaCan JanRain support logging across multiple websites while still communicating with Facebook? - echoЧто такое бизнес-модель служб сокращения URL-адресов, таких как bit.ly и tinurl? - urlWhat is the size limit for jQuery ajax call return value? - jqueryhow to distinguish a slot in several levels of pure functions in mathematics - wolfram-mathematicaA lock that can be transferred from one thread to another - javaAll Articles