fix memory leak

change int[] to boolean[]