relocated array init preventing mem leaks