Fixed memory leak in temp barrier.