3 ms·
That's not really to enable garbage collection. In C++, for example, objects with dynamic storage duration will be referenced off the stack by a pointer to your
by nly 12y ago
That's not really to enable garbage collection. In C++, for example, objects with dynamic storage duration will be referenced off the stack by a pointer to your object, which in turn, if the object is of polymorphic type, contains a pointer to the class vtable and runtime type information. That's not so much wrapping as required infrastructure for runtime polymorphism, interfaces etc... even if you replicate the same features in C.
Presumably the major difference in Java with re: GC is that there's enough introspection left in the RTTI after compilation for the GC to identify internal references.