August 31, 2020
Hello!

I've been trying to implement something like that:

struct Element
{
    bool isPendingRelease;
}

DList!Element elements;

void FreePendingElements()
{
    foreach(ref elem; elements)
    {
        if (elem.isPendingRelease)
        {
            // remove it here from elements
        }
    }
}

What's the best way to implement the logic I want?

Thanks,
Ivan