The damping of the giant resonances in heavy and medium-heavy nuclei