Testing potential method of clearing arrays and its garbage collection