(1) For the purposes of this Act a charge against a person for an offence is pending until the charge is finally dealt with, including in any of the following ways—
(a) the charge is withdrawn or the person dies without the charge having been determined;
(b) the charge is dismissed by a court;
(c) the person is discharged by a court following a committal hearing;
(d) the person is acquitted or found guilty of the offence by a court;
(e) the person is discharged by the Magistrates' Court after completing a diversion program under section 59 of the Criminal Procedure Act 2009 ;
(f) the person is discharged by the Children's Court after completing a diversion program under section 356D of the Children, Youth and Families Act 2005 .
(2) A reference in this Act to the withdrawing of a charge includes a reference to the discontinuance of a prosecution.