more memory leak protection