Pascal and C traditionally do not use garbage collection. Instead, they used manual memory management ( malloc/ freefor C and new/ disposein Pascal).
Garbage collection can be added in most languages ββthat do not have them, but often at significant cost. An example of a garbage collector for C / C ++ is the Boehm GC .
Java, on the other hand, was designed with garbage collection from scratch.