Automatic Memory Management Conclusions
- It prevents very serious bugs but reduces programmer’s control as now programmer don’t know the memory structure and don’t know when memory is deallocated.
- In real-time applications it can be very inefficient as the pauses should be less frequent or very short.
- Memory leaks are also possible. X points to an AST and IL is made out of it then this AST is no longer needed, so it’s pointer should be changed to NULL.
- There are more advanced GCs:
- Concurrent: program and GC can run simultaneously
- Generational: Objects that are not usually ccoolected are stored somewhere else and GC focuses on collecting on those objects which are more likely to be freed
- Run-time: The pause time is restricted
- Parallel: several collectors can work simultaneously.