improved memory leak handling when deleting reference elements and added more benchmarks