Why Garbage Collection if smart pointers are there

Posted by Gulshan on Programmers See other posts from Programmers or by Gulshan
Published on 2010-12-27T11:58:20Z Indexed on 2010/12/27 13:59 UTC
Read the original article Hit count: 432

This days, so many languages are garbage collected. Even it is available for C++ by third parties. But, C++ has RAII and smart pointers. So, what's the point of using garbage collection? Is it doing something extra?

And in other languages like C#, if all the references are treated as smart pointers(keeping RAII aside), by specification and by implementation, will there be still any need of garbage collectors? If no, then why this is not so?

© Programmers or respective owner

Related posts about garbage-collection

Related posts about smart-pointer