3 ms·
Objects on the stack don't participate in the GC (technically they're GC roots). Half of the reason you want to be able to put variables on the stack is because
by adgjlsfhk1 3y ago
Objects on the stack don't participate in the GC (technically they're GC roots). Half of the reason you want to be able to put variables on the stack is because the stack variables are managed by lifetime and therefore the GC doesn't have to collect them.