(a) Any police officer or other person making an arrest without a warrant in accordance with this chapter shall immediately thereafter make an affidavit and apply to the Chief Justice, Associate Justice, District Court Judge, or an Associate Judge of the High Court for a warrant of arrest and commitment of the person under arrest.

(b) Nothing in this section may be so construed as to prevent the detention for not to exceed 36 hours of any person lawfully arrested by a police officer when the arresting officer deems the same necessary for the safety of the person arrested or the public.