I'm calculating 4.2 cap hit if he retires after 2015-16 season, and 5.67 after 2016-17, 2017-18 or 2018-2019.
By that time that cap hit would be minimal compared to the total cap.
I don't think this would stop them from buying him out. Also, i feel it's up to the new coach.