Moved the Alloc into the for loop, so it'll be allocated and freed appropriately.  This fixed the memory leaks