In the past you would lose (or regain) all reputation due to a post being deleted, but this has changed in March 2012.
http://blog.stackoverflow.com/2012/03/reputation-and-historical-archives/https://blog.stackoverflow.com/2012/03/reputation-and-historical-archives/
There is now an exception to the rule that votes are reversed at the time of deletion and that is to reward content of "lasting value" as follows:
First, if you’ve contributed something worthwhile to the site, you should keep the reputation for that even if it eventually gets deleted. “Worthwhile” here is defined as,
- A score of 3 or greater
- Visible on the site for at least 60 days
In fast-changing professions, there should be no shame in contributing valuable information just because it eventually goes out of date – and there shouldn’t be a penalty for deleting it when it does. Naturally, editing to bring an answer up-to-date is preferable – but if someone else already posted a good answer with current information, you should be able to remove yours and keep the reward for the time it was useful.