fix #81: managed memory leak