I am not a tax expert, but my understanding is that buildings are capital assets and they are written down over a period of time. If they still have a book value at a certain point and they are demolished, then the owner would be able to deduct that amount from their taxes.
On December 6th, 2007. See this statement in context.