A district court, upon complaint under oath that any person has in possession or under control any of the obscene books, papers, or other matter specified in sections 617.241 to 617.26, shall issue a warrant directed to the sheriff of the county, directing the sheriff to search for, seize, and take possession of the obscene matter. Upon conviction of the person in whose possession the obscene matter was found, the judge shall cause it to be destroyed, and the fact to be entered upon the records of the court.