Saving a line-item object
That isn't the right way to save a line item. All that second line does is remove the item from the entity controller's static cache.

As CommerceLineItemEntityController::save() already manipulates the static cache directly to ensure the updated entity is in it, the second line is redundant. All it does is force unnecessary database usage if/when the same line item is loaded again in the same request.

This is all you need to create or update a line item:

commerce_line_item_save($item);


Remember that $item is an object, so doesn't need to be passed by reference as you mentioned in the comments.