Is it possible for a language without interpretation to have a garbage collector. Interpreted languages have an interpreter that runs the Program line by line, so the interpreter can also provide GC runtime. But is it possible to have a garbage collector for any other language without creating a GC in your code?
Yes.
C ++ with the implementation of a smart pointer will collect garbage, since the count of references to smart pointers is zero.
You have a garbage collection. You yourself did not create it.
, , . /, .
, .NET( IL-#, VB.NET, M++ ..) ( NGEN) - .
, Java.
- http://www.hpl.hp.com/personal/Hans_Boehm/gc/
, C / ++, . GC Boehm http://www.hpl.hp.com/personal/Hans_Boehm/gc/
Haskell , .
The new C ++ 0x includes features that facilitate the implementation of the garbage collection. See here for an interview .
Objective-C 2 now has garbage collection, and there are garbage collection libraries available also for C ++.
I think this is possible if there is a language that allows you to scan objects so that you can traverse the tree of objects.