A judge of the superior court within the county, wherein a cause is pending against any person charged with a felony, may justify and approve bail in the said cause, and may execute an order for the release of the defendant which shall authorize the discharge of the defendant by any officer having said defendant in custody.