The CrPC 1973 was replaced by the BNSS 2023 (in force 2024-07-01); no verified section mapping on file for Section 239 — confirm the corresponding provision (savings: Section 531, BNSS 2023).
If, upon considering the police report and the documents sent with it under Section 173 and making such examination, if any, of the accused as the Magistrate thinks necessary and after giving the prosecution and the accused an opportunity of being heard, the Magistrate considers the charge against the accused to be groundless, he shall discharge the accused, and record his reasons for so doing.