When a minor is delivered to the court, or to the place designated by the court under Section 3-9 of this Act, a probation officer or such other public officer designated by the court shall immediately investigate the circumstances of the minor and the facts surrounding the minor being taken into custody. The minor shall be immediately released to the custody of the minor's parent, guardian, legal custodian or responsible relative, unless the probation officer or such other public officer designated by the court finds that further shelter care is necessary as provided in Section 3-7. This Section shall in no way be construed to limit Section 5-905.
705 ILCS 405/3-10