wade wrote: > Thanks again for all the help. I found what the problem was and it wasn't > obvious (at least to me): > > float[uint] arr; > > foreach (uint k; arr.keys) > { > ... > } > > Changing this to: > > foreach (uint k, float v; arr) > { > .... > } > > fixes the leak. I guess the keys array is constructed on the fly? > > wade
Yup. It's a pity that we don't have, oh I don't know, some sort of efficient iterable interface that doesn't cause a heap allocation that the runtime could use instead *cough*hint*cough*andrei*cough*ranges*cough*. -- Daniel