title: Understanding the meaning of the term and the concept - RAII (Resource Acquisition is Initialization)
body: <p>Could you C++ developers please give us a good description of what RAII is, why it is important, and whether or not it might have any relevance to other languages?</p>
  
  <p>I <em>do</em> know a little bit. I believe it stands for "Resource Acquisition is Initialization". However, that name doesn't jive with my (possibly incorrect) understanding of what RAII is: I get the impression that RAII is a way of initializing objects on the stack such that, when those variables go out of scope, the destructors will automatically be called causing the resources to be cleaned up.</p>
  
  <p>So why isn't that called "using the stack to trigger cleanup" (UTSTTC:)? How do you get from there to "RAII"?</p>
  
  <p>And how can you make something on the stack that will cause the cleanup of something that lives on the heap? Also, are there cases where you can't use RAII? Do you ever find yourself wishing for garbage collection? At least a garbage collector you could use for some objects while letting others be managed?</p>
  
  <p>Thanks.</p>