开发者

Garbage collection in SML, Java, C, Pascal

Why is garbage col开发者_开发知识库lection rarely spoken about in languages such as Pascal and C, whereas it is very important in SML and Java?


Pascal and C don't traditionally use garbage collections. They used manual memory management instead (malloc/free for C and new/dispose in Pascal).

Garbage collection can be added in most languages that don't have them, but often with considerable expenses. An example of a garbage collector for C/C++ is the Boehm GC.

Java, on the other hand, has been designed with garbage collection from the ground up.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜