The duties of a gratuitous depositary cease:
(a)
Upon restoration by the depositary of the thing deposited to its owner.
(b)
Upon reasonable notice given by the depositary to the owner to remove it, and the owner failing to do so within a reasonable time. But an involuntary depositary, under subdivision (b) of Section 1815, may not give notice until the emergency that gave rise to the deposit is past. This subdivision shall not apply
to a public pound, a shelter operated by a society for the prevention of cruelty to animals, or a humane shelter. The duty to provide care, as required by Section 1846, continues until the public pound or private shelter is lawfully relieved of responsibility for the animal.