TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Why garbage collection?

3 点作者 chrisdew超过 13 年前
C programmers (myself included) can often write correct programs with manual memory management (malloc/free).<p>Why can't a sufficiently capable compiler/language manage its memory based on static analysis of a program? (i.e. insert its own 'free's where a programmer would have put them)

1 comment

div超过 13 年前
They can, and it's basically what LLVM does when you turn on ARC for your Objective-C program.<p><a href="http://stackoverflow.com/questions/6385212/how-does-the-new-automatic-reference-counting-mechanism-work/6418410#6418410" rel="nofollow">http://stackoverflow.com/questions/6385212/how-does-the-new-...</a>
评论 #3159278 未加载
评论 #3159279 未加载
评论 #3158266 未加载