This great answer explains how GC is able to collect local variables before the method finishes executing:
The jitter performs two important duties when it compiles the IL for a method into machine code. ... It also generates a table that describes how the local variables inside the method body are used. That table has an entry for each method argument and local variable with two addresses. The address where the variable will first store an object reference. And the address of the machine code instruction where that variable is no longer used. ... The "no longer used" address in the table is very important. It makes the garbage collector very efficient. It can collect an object reference, even if it is used inside a method and that method hasn't finished executing yet.
I'm curious about how JIT created internal tables look like, and how "no longer used" addresses are maintained in the real clr source code. Can anybody show me related code snippets in the recently open sourced coreclr source code?