Ok, I understand how to use this keyword. What I'm interested in is how it is actually accomplished. Let's say you have a static variable declared in a function. That variable is created on the stack. When the variable leaves scope (function returns), the variable needs to get popped off the stack. Where does its value get stored? Does the compiler automatically allocate some memory on the heap for it? It has to get stored somewhere, because when the function is called again and the variable is in scope, it gets put back on the stack with its previous value, right?