494. Effect of with-drawal from prosecution

(a) if it is made before a charge has been framed, the accused shall be discharged [in respect of such offence or offences];
(b) if is made after a charger has been framed, or when under this Code no charge is required, he shall be acquitted [in respect of such offence or offences.]