I just deleted my own +3 answer to a closed (duplicate) question because the question was an exact duplicate and therefore I didn't see the point in leaving it.
Is this good practice?
If your answer would still make sense on the original question (and it's not just repeating another answer that's already there), it would probably be better to flag the question for merging.
There's also no harm in just leaving the answer alone. If someone finds the duplicate first in a Google search, they might find it useful to have an answer on the same page, rather than having to click through to the original.
If the answer was good (and it was not provided by the original question), it is not good.
You could flag for moderator attention and have the answer moved to the original question, or you could have left it.
Remember that good answers, are more valuable than bad questions.