Mitigates possible memory leaks