Proper array clearing for queues.