Creating an object and then not using it can lead to unexpected behavior if the constructor contains side effects.
If the code intentionally creates and drops an object to trigger the constructor side effects, consider moving them to a separate function and call it directly.