That seems unnecessary. JavaScript is memory safe.