San Francisco police have written thousands of tickets this year for quality-of-life offenses such as sleeping in parks, urinating on sidewalks and being drunk in public — but then, the courts no longer enforce them.

A year ago, the Superior Court judges who hear such cases stopped issuing bench warrants for no-show defendants. And just last month, Judge Christopher Hite in the court’s traffic division — where quality-of-life citations are handled — flushed all 64,713 outstanding warrants that had been issued for such cases from January 2011 through October 2015.

And without any warrants, there is no way for the cops to detain someone who has skipped out on his or her court appearances.

Even though judges are simply disposing of new cases, court records show that police have issued citations for 16,831 infractions of city codes dealing with quality-of-life issues in the past 11 months.

“When the cops are called about someone pissing on an elevator at BART, we will respond, and we will issue a citation,” said Martin Halloran, head of the San Francisco Police Officers Association. “But we have no control over the courts.”

Superior Court spokeswoman Ann Donlan said the decision to discharge the backlogged warrants was based largely on a recognition that the fines — most of which started at about $200 and grew to nearly $500 when the offenders didn’t pay them on time — were “never going to be collected anyway.”

“Essentially, we end up with people not showing up (for their hearings) and the problem escalates, and the court just carries all this uncollected debt,” Donlan said.

Still, the police rank and file aren’t happy that their tickets no longer have teeth.

“It’s sending a message that there is no accountability for what you have done, and the laws on the books can be violated with no repercussions,” Halloran said. “I don’t think it’s what the public wants.”

Court officials tell us that as the judge who presides over quality-of-life citations, Hite was acting within his authority to dump the backlog of warrants.

Hite, a former deputy public defender, didn’t respond to our call to his office seeking comment.

A spokesman for the district attorney’s office declined to comment, noting that prosecutors don’t get involved in cases handled by the traffic courts.

As for Mayor Ed Lee, his spokeswoman sent us a statement accusing the judges of failing to “meet the responsibilities voters elected them to. When one branch of government fails — be it executive legislative or judicial — we all fail.”

The court’s hands-off policy comes amid public frustration over what appears to be increasingly bad behavior on the streets and a swelling homeless population. On Tuesday, San Francisco voters approved a ballot measure allowing the cops to remove tents from the streets with 24 hours’ notice, as long as the city has a shelter bed to offer.

A Coalition on Homelessness survey in 2015 found that more than two-thirds of the 351 street dwellers they contacted had been issued at least one quality-of-life citation in the previous year — and 22 percent said they had received five or more.

But a city budget analyst’s report as far back as 2002 found that the majority of those ticketed for quality-of-life infractions “fail to pay fines or appear in court, and a large number of misdemeanor citations result in cases being discharged or dismissed.”

Still, the court over the years typically issued bench warrants for violators who didn’t show up. That allowed police the discretion to make arrests, and potentially keep troublesome repeat offenders jailed at least until they appeared in court.

Donlan said the rationale for not pursuing people for such warrants coincides with the court’s year-old policy of not issuing warrants for people who haven’t paid their traffic fines: It’s seen as an unfair burden on the poor.

“Our costs to collect fees and fines from people who are unable to pay does not justify the expense,” Donlan said, and dumping the practice “is consistent with the statewide judicial policy of discharging outstanding traffic warrants and eliminating financial burdens on low-income citizens.”

Add in the fact that the thousands of outstanding warrants clogged a court system burdened by years of state budget cuts, and court officials see this as a chance to devote their resources to more serious misdemeanor and felony cases.

After all, Donlan said, “none of the citations are punishable by imprisonment.”

So now, when someone cited for a quality-of-life offense fails to appear in court, the person can still be found guilty in absentia — but there’s no actual enforcement activity.

The case simply goes away.