perfbook/counter-benchmark: cleanup memory
perfbook/counter-benchmark: deleted unneeded function