Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6025819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:21:20+00:00 2026-05-23T04:21:20+00:00

I was reading about the fact that LLVM v3 uses a static analysis of

  • 0

I was reading about the fact that LLVM v3 uses a static analysis of the code to implement a sort of automatic garbage collection that is prepared and done during compilation.

If the compiler statically inserts retains and releases then no runtime component for garbage collection is needed anymore or what?

Is this true? Will it work as a replacement of normal garbage collection either on iOS and OS X development? It is not clear what will happen..

Should we rely this kind of “static garbage collection”?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:21:21+00:00Added an answer on May 23, 2026 at 4:21 am

    This is an interesting question: can a static analyzer implement a complete garbage collection system?

    The answer, it appears, would be no. The only way to implement garbage collection is knowing that an allocated piece of memory (e.g. an object instance) is no longer useable. In a runtime GC, this knowledge is gained by (effectively) scanning the stack and heap. Doing this at compile time would require analyzing all possible code paths through the system to determine where in its execution a particular allocation would no longer be reachable. This is equivalent to the halting problem. However, LLVM claims to support at least a limited form of automatic reference counting (inserting retain/releases) for you. See http://developer.apple.com/technologies/ios5/. I suspect that what LLVM is doing is not a full GC, it’s using the static analyzer to find when all references to an object go out of scope, and inserting appropriate retain/releases for you. The reference counting happens at run time, just as before. I highly doubt that it will do automatic free-ing of malloc’d blocks for you.

    If it works as advertised on the public site above, I’d say use it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been reading about the new developer-only RC0 for Silverlight, and the fact that
As im reading through 3 books about GC , ive notice some strange fact
Reading about Delphi's Exit statement (see here for instance), I cannot ignore that writing
When reading about pipes in Advanced Programming in the UNIX Environment, I noticed that
I was reading something about boolean attribute here , which says that for a
I was briefly reading about Maxine which is an open source JVM implementation that
After reading about dynamic class loading (that is, loading a .class file from disk)
I am reading a tutorial that uses the following example (that I'll generalize somewhat):
I'm reading about Mongodb's indexes for my Mongodb project I am well aware that
Apple does say in the documentation about the fact that they do not want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.