+ 2

Why garbage collection is not there in c programming?

21st Jan 2017, 7:39 AM
Bhargav Mehta
Bhargav Mehta - avatar
2 Respuestas
+ 2
Because C suppose that you keep control of memory management to optimize it: garbage collection is an automated task, wich isn't perfect ( as nobody :P ), and comes with adavantages ( be concentrate to the heart of your programm since manage memory ) as disadvantages ( less control/powerful )... But you can write one if you want :P
21st Jan 2017, 7:53 AM
visph
visph - avatar
+ 1
languages with garbage collection like java have been created later than C and C++. Probably out of the realisation that, in most cases, managing memory in code was unnecessary hassle and the cause of lots of bugs!
21st Jan 2017, 7:57 AM
ifl
ifl - avatar