For instance many C compilers limit expression nesting, identifier length, include file nesting and macro stack depth. This causes problems for programs that generate C. One partial solution to a lack of GC is reference counting. In this scheme each object keeps a count of references to it. When this count drops to zero the object is automatically deallocated. Opponents of GC reply that it introduces an overhead which is unacceptable in some applications.
GC algorithms are also available with good real-time behaviour.
This is an excellent summary of the state of the art in GC algorithms. There are several reasons why true object-oriented programming requires garbage collection. Manual Memory Management Breaks Encapsulation. Program components frequently need knowledge of an entire program to determine the last use of an object and provide deletion. This makes reuse of the component nearly impossible.