I think there's two separate points here:
1/ Paying the contract - they won't be obliged to pay him if he retires.
2/ Salary cap - I would bloody well hope that they would have to have the $ in the cap even if he retires.
If you retire due to injury I think you get paid your contract. It counts in the cap regardless due to being a RFA.