In all criminal cases in the circuit court in which a capias or warrant of arrest has issued for two terms and has been returned "not found," the district attorney may, by leave of the court, withdraw and file the indictment, with leave to reinstate the same when the ends of justice require such reinstatement. In all cases where a defendant is confined in one of the Alabama state hospitals under the provisions of Sections 15-16-21 and 15-16-22, the district attorney may, by leave of the court, withdraw and file the indictment, with leave to reinstate the same when the ends of justice require such reinstatement.
Ala. Code § 15-8-71 (1975)