The Man with the Golden Arm

Frankie Machine (Frank Sinatra)
Frankie Machine (Frank Sinatra) is released from prison with a set of drums and a new outlook on life, and returns to his run-down neighborhood on the North Side of Chicago. A drug addict (the drug is never named, but heroin is strongly implied), Frankie became clean in prison. On the outside, he greets friends and acquaintances. Sparrow (Arnold Stang), who runs a con selling homeless dogs, clings to him like a young brother, but Schwiefka (Robert Strauss), whom Frankie used to deal for in his illegal card game, has more sinister reasons for welcoming him back, as does Louie (Darren McGavin), Machine's former drug dealer.
Frankie returns home to his wife Zosh (Eleanor Parker), who is supposedly wheelchair-bound after a car crash some years earlier that was caused by Frankie driving drunk. Zosh is secretly fully recovered, but pretends to be unable to walk in order to keep making Frankie feel guilty so he will stay with her. Frankie comments on the whistle she wears around her neck, a device she used in Frankie's absence to summon a neighbor, Vi (Doro Merande), when needed. With Frankie home, Zosh smothers her husband in their small tenement apartment and hinders his attempt to make something of himself. He thinks he has what it takes to play drums for a big band. While calling to make an appointment, he bumps into an old flame, Molly (Kim Novak) who works in a local strip joint as a hostess and lives in the apartment below Frankie's. Unlike Zosh, Molly encourages his dream of becoming a drummer.
Frankie soon gets himself a tryout and asks Sparrow to get him a new suit, but the suit is a stolen one and he ends up back in a cell at a local Chicago Police Precinct. Schwiefka offers to pay the bail. Frankie refuses, but soon changes his mind when the sight of a drug addict on the edge becomes too much for him. Now, to repay the debt, he must deal cards for Schwiefka again. Louie is trying to hook him on drugs again, and with no job and Zosh to please, pressure is building from all directions.
Soon Frankie succumbs and is back on drugs and dealing marathon, all-night, card games for Schwiefka. Molly sees he is using drugs again and runs away from him. He gets a tryout as a drummer, but spends 24 hours straight dealing a poker game. Desperately needing a fix, Frankie follows Louie home, attacks him, and ransacks his house, but can't find his drug stash. At the audition, with withdrawal coming on, Frankie can't keep the beat and ruins his chance of landing the drumming job. When Louie goes to see Zosh to try to find Frankie, Louie discovers that Zosh has been faking her paralysis and can walk. Zosh, scared of being found out, pushes Louie over the railing of the stairwell to his death, but things backfire when Frankie is sought for Louie's murder.
Initially not realizing he is a suspect in Louie's death, Frankie goes to Molly hoping to get money for a fix. After learning that Captain Bednar and the police are looking for him, Molly convinces Frankie that he must go cold turkey if he is to stand a chance with the police. Frankie agrees and is locked in Molly's apartment where he goes through a grueling withdrawal to clear the drugs from his body. Finally clean again, he tells Zosh he is going to leave her, start anew and stand trial. In her desperation to keep Frankie from leaving her, Zosh once again gives herself away, standing up in front of Frankie and the police. She runs, but can get no farther than the outside balcony. Trapped, she blows the whistle and throws herself off the balcony to her death. A police ambulance then arrives to remove Zosh's lifeless body and drives away, while Frankie watches in dismay. He then walks away, with Molly following.

Question: Where does Frankie get clean?
Answer: Prison