I'm wondering if a delegate which theoretically doesn't need to make a heap closure, might allocate anyway. Somehow I don't want to assume the compiler will do the non-allocating way.

This is the code I wrote:
---

    bool feed(float x, Complex!float[] fftData)
    {
        void processSegment(float[] segment)
        {
fftData.length = _fftSize; // we do need the delegate context here

            /* do stuff with segment and fftData */
        }

// _analyzer.feed takes a void delegate(float[]) as parameter
        // will this line allocate?
        return _analyzer.feed(x, &processSegment);
    }

---

Does the last line allocate?

Reply via email to