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.
More Related Contents:
- What is a shell script, makefile and ant file [closed]
- Can I see another sample of this program? I'm having difficulty in understanding it [closed]
- Division In C++ and java?
- String Matching in Java or C#
- Calling java code from c#
- not able to understand the working of static concept here in
- What is the Java equivalent of Trim(‘/’) in C# [duplicate]
- What is GCC and minGW, and how are they related to C++ ?
- Error java.lang.OutOfMemoryError: GC overhead limit exceeded
- finalize() called on strongly reachable objects in Java 8
- Permutation of array
- What is the garbage collector in Java?
- max value of integer
- Does setting Java objects to null do anything anymore?
- Java Garbage Collection Log messages
- How to obtain JNI interface pointer (JNIEnv *) for asynchronous calls
- GC overhead limit exceeded
- Analyzing gc logs
- Garbage collection behaviour for String.intern()
- Empty an ArrayList or just create a new one and let the old one be garbage collected? [duplicate]
- Class method and variable with same name, compile error in C++ not in Java?
- How do I get the intersection between two arrays as a new array?
- Is there an effective tool to convert C# code to Java code? [duplicate]
- Reference to object during finalize
- Virtual table/dispatch table
- Java and manually executing finalize
- Persisting sha256 hash objects?
- Java GC (Allocation Failure)
- Interview question – Search in sorted array X for index i such that X[i] = i
- C++ ifstream.getline() significantly slower than Java’s BufferedReader.readLine()?