Why is garbage collection so important?

I don’t understand that garbage collection is so good, then I want to know why it is so important for the language and for the developer?

+3
source share
9 answers

Garbage collection is part of many modern languages ​​that attempt to abstract the deletion and reallocation of memory with less developer intervention.

When you hear talk about “safe” objects, this usually refers to whose memory can be automatically redistributed by the garbage collector after the object goes out of scope or is explicitly allocated.

, , , .

,

.. , ( ), ,

( ) . GC, , GC .

+6

, , , , , , , GC . , (.. ) , , .

, , . , , , , -, , , . .

+17
+6

Garbage Collection - . , .

, .

+6

, . , .NET, , , , . , C ++, , .

, , . , - , .

+4

; , , , , , , . , , . ; , , .

, . , , - , , . Java, , , , , , ( ) , ++. , , , , , , .

+3

, . , , , , -, ( ).

, , "" (), , , .

, , , , , .. .. , , , GC ( ), , .

, GC, - . ( ) , (, ), , , - .. Dispose(), ( ) , , GC.

+1

, , java, , , . ++ , , , . , / java ++.

0

-

(())

. .

-1

Source: https://habr.com/ru/post/1722236/


All Articles