marcov, Which OS do you target? I've had to add proper cleanup to my code or a (memory allocation error) message pop is generated by windows OS.
It is not Windows. That are your lazarus settings (heaptrc/-gh).
I know you know, but for others... as posted before, you should allocate in backwards order to the allocation so your for loop should be
for i= some.count-1 down to 0
some[i].free;
Could you explain the motivation for that backwards order ? Since you say it is necessary, I'm sure you can explain why.
Oh, and btw, I didn't specify what TYPE "some" was.. So some might not be a linear list at all.
And most importantly, you miss the point. there should be an exception handler around the free, inside the for.