When the defendant is found not guilty by the justice or a jury, the defendant shall be immediately discharged.