This is one of my favorite TNG episodes too, My take was a little different. I thought it reflected badly on the morality of the Federation. After all, the holodeck characters ability to question their reality as the detective did would seem to me to qualify them as sentient beings. And the Federation condones creating them and destroying them for the amusement of the crew. Sounds a tad like slavery.