The last passage of the novel directly addresses Ralph's loss of innocence:
"And in the middle of them, with filthy body, matted hair, and unwiped nose, Ralph wept for the end of innocence, the darkness of man's heart..."
Perhaps we can argue that the flap which repeatedly comes down in Ralph's mind is the door closing on his innocence. He is cut off from his old way of thinking yet unprepared to step into the adult world. He's lost his innocence but not yet gained anything to replace it.
One of the really telling moments in the novel occurs after Piggy's death, and Ralph finds himself utterly alone. For so much of the novel, Piggy was always there as a support to Ralph, as a second voice of reason amidst the chaos. Now Ralph wonders what will become of him:
"He argued unconvincingly that they would let him alone, perhaps even make an outlaw of him. But then the fatal unreasoning knowledge came to him again. The breaking of the conch and the deaths of Piggy and Simon lay over the island like a vapor. These painted savages would go further and further. Then there was that indefinable connection between himself and Jack; who therefore would never let him alone; never" (184).