section 498(1.1)


498(1.1) The officer in charge or the peace officer shall not release a person under subsection (1) if the officer in charge or peace officer believes, on reasonable grounds, (a) that it is necessary in the public interest that the person be detained in custody or that the matter of their release from custody be dealt with under another provision of this Part, having regard to all the circumstances including the need to (i) establish the identity of the person, (ii) secure or preserve evidence of or relating to the offence, (iii) prevent the continuation or repetition of the offence or the commission of another offence, or (iv) ensure the safety and security of any victim of or witness to the offence; or (b) that, if the person is released from custody, the person will fail to attend court in order to be dealt with according to law.