[Solved] What is the difference between Java Garbage collection and C++ object destruction? [closed]


C++ destruction is deterministic, garbage collection is not.

In C++ you can guarantee when destructors will be called, in Java there is no such guarantee at all. In fact, your destructors might never be called in Java.

3

solved What is the difference between Java Garbage collection and C++ object destruction? [closed]