On This Page
Advantage:
Automatically collect circular-referenced garbage;
Small object allocation is faster than standard C++;
Reclaims multiple objects in one go, less synchronization cost;
Object Pool provides fast linear allocation speed;
Convenient API for Serialization;
Enhanced cyclic-collectable COM;
No stack overflow issue of nested destructions for reference counting, as boost::shared_ptr and boost::intrusive_ptr;
Disadvantage:
Extra cost on some smart pointer operations, such as pointer assignment;
Must upgrade C++ classes and pointers to managed version;
Advantage:
Pauseless, block-free, no suspension and interruption from garbage collector;
Immediately reclaim objects that lost all references;
Allow multiple-inheritance, object as member variables or elements of array;
Faster and convenient communications with native code, no need to "pin" an object;
All HnxGC pointers can point to the interior of an object, better than cli::interior_ptr;
Object reclamation ordering control API;
Provide delay-destructing, thread associated destructing API;
Faster for medium or large objects, more than x100 times faster in some cases;
(Object Pool provides linear allocation for small objects, the speed can reach the same degree of .NET framework);
Introduce SubHeap concept to fast collect garbage within a group of objects;
Enhanced cyclic-collectable COM;
More choices of different compilers, no VM requirement on target platforms;
Disadvantage:
Extra cost on some smart pointer operations, such as pointer assignment;
Advantage:
Pauseless, block-free, no suspension and interruption from garbage collector;
Immediately reclaim objects that lost all references;
Allow multiple-inheritance, object as member variables or elements of array;
All HnxGC pointers can point to the interior of an object;
Object reclamation ordering control API;
Provide delay-destructing, thread associated destructing API;
Object Pool provides linear allocation for small objects, run faster;
SubHeap concept to trace references within a group of objects;
Directly precompiled into target machine code, run faster;
Faster and convenient communications to/from native code;
Enhanced cyclic-collectable COM;
Disadvantage:
Extra cost on some smart pointer operations, such as pointer assignment;
Advantage:
Pauseless, block-free, no suspension and interruption from garbage collector;
Immediately reclaim objects that lost all references;
Object reclamation ordering control API;
Provide delay-destructing, thread associated destructing API;
Faster for medium or large objects;
Object Pool provides linear allocation for small objects, run faster;
SubHeap concept to trace references within a group of objects;
Convenient API for Serialization;
Enhanced cyclic-collectable COM;
no VM requirement on target platforms;
Disadvantage:
Extra cost on some smart pointer operations, such as pointer assignment;
Must upgrade C++ classes and pointers to managed version;
| Feature List | HnxGC | C/C++ | .NET | BDW | Java | Boost |
|---|---|---|---|---|---|---|
| Collect Cyclic Garbage | Yes | No | Yes | Yes | Yes | No |
| Reference Counting | Yes | No | No | No | No | Yes |
| Multiple-Inheritance | Yes | Yes | No | No | No | Yes |
| Object As Member Variables | Yes | Yes | No | No | No | Yes |
| Object As Array Elements | Yes | Yes | No | No | No | Yes |
| Pauseless, Block-Free, No Suspension | Yes | Yes | No | No | No | Yes |
| Interior Pointer | Yes | Yes | Yes | Yes | No | No |
| Raw (Native) Access | Yes | Yes | No | Yes | No | Yes |
| Reclamation Ordering Control | Yes | - | No | No | No | - |
| Resurrection | Yes | - | Yes | Yes | Yes | - |
| Delay-Destructing | Yes | - | - | - | - | No |
| Thread Associated Destructing | Yes | No | No | No | No | No |
| Serialization | Yes | No | Yes | No | Yes | No |
| Collect Cyclic COM Object | Yes | No | No | No | No | No |
| Support RAII Convention | Yes | Yes | No | No | No | - |
| Union, Hidden Pointer | Yes | Yes | No | No | No | Yes |
| Exception | Yes | Yes | Yes | - | Yes | - |
| Template of Managed Object | Yes | Yes | - | Yes | No | Yes |
| Require VM on Platform | No | No | Yes | Yes | - | No |
| Need Cooperative C++ Compiler | No | No | Yes | No | - | No |
| Linear Allocation Speed | Yes | No | Yes | No | - | No |
| Sub Heap GC | Yes | No | No | No | No | No |
| Precompiled to Machine Code | Yes | Yes | Yes | Yes | No | Yes |
| Nested Destructions Issue | No | - | - | - | - | Yes |
| Need Upgrade Source Code | Yes | No | Yes | No | Yes | Yes |
| Cost on Pointer Assignment | Yes | No | No | No | - | Yes |