In the fourth chapter of the third book, Winston has a hallucination about Julia. He has this moment after he had been daydreaming about the Golden Country. In fact, the hallucination is so strong that he shouts Julia's name out several times. Look directly at Orwell's words:
She had seemed to be not merely with him, but inside him. It was as though she had got into the texture of his skin. In that moment he had loved her far more than he had ever done when they were together and free.
This recollection of Julia makes him feel like he had committed a crime against the Party. He knew the act was morally wrong according to their expectations of acceptable behavior. The facts that he uttered her name out loud, and had such a human and emotional experience deeply convicted him. He feared this scream would result in execution, and listened for footsteps of the Thought Police to come and get him.