Irradiation pinning and thermal depinning of dislocations