I've been hearing that delegates get a context pointer which will be allocated on the GC. Is this also true for delegates which stay in scope?

e.g.

void addThree() {
        int val;
        void addOne() {
                val++;
        }
        
        addOne();
        addOne();
        addOne();

        return val;
}

Will the above function allocate on the GC?

Reply via email to