Avoid unnecessary memory allocation