O'Leary's ex-husband told the court that the pair had attended court-ordered parenting classes.
"It was a class to educate new parents ... or parents in general," Khang Chen said. "How to raise a healthy child."
Prosecutors used that as evidence that O'Leary knew what she needed to do, but argued that her pride prevented her from doing it.
"This was a thought-out, planned course of action," Donnorummo said.
"She knew what she needed to do."
She also said that O'Leary's oldest child, Lilly, had been diagnosed with failure to thrive.
"Ignorance is not a defence in this case," she said.
She said O'Leary had told police her son hadn't eaten in the week leading up to his death.
"She made choices that killed her child. Her pride cost Ezra his life. It is a reckless disregard for human life," Donnorummo told the court.
The defence claimed it was a "tragically horrible situation" but argued that O'Leary loved her children and there was no medical proof of neglect.
Assistant State Attorney Sara Miller then told the court it was clear a crime had been committed.
"She chose to disregard Ezra's suffering," Miller said. "She chose to disregard his cries."
"She didn't need a scale to see his bones. She didn't need a scale to hear his cry."