Abstract: A locking device for locking a heat-dissipating member securely in position on the housing of a CPU is provided. The locking device includes a flexible securing piece which is an integral piece including an elongated flexible middle portion having one end formed into a first fastening portion and the other end formed into a coupling portion. The first fastening portion is formed with a first fastening hole, and the coupling portion is formed with an angled portion and a slot extending from the angled portion to near the hook-shaped portion. Further, the locking device includes a pressable fastening piece which includes a second fastening portion having a second fastening hole; a pair of hook-shaped pieces linked to the second fastening portion; a stopper linked to the hook-shaped pieces; and a press portion linked to the second fastening portion; wherein the hook-shaped pieces and the stopper are coupled to the slot in the coupling portion of the flexible securing piece.