fix benchmark memleak in loop mode