The throwaway release of the lovely new romantic comedy "All Night Long," which slipped into area theaters yesterday unscreened and scantly publicized, is a most dismaying scandal.

It's not as if a group of cloutless nobodies were involved in this second-chance fable about two mismated Southern California suburbanites, played by Gene Hackman and Barbra Streisand, whose improbable love affair leads them to attempt fresh starts together. The savory screenplay was written by W. D. Richter, an Oscar nominee for "Brubaker." Although his recent credits have diverged in other directions, Richter is at his most distinctive as a humorist. He has a keen affection for eccentricity and a genius for delayed-action comic dialogue.

The director, Jean-Claude Tramont, is making his American feature debut, and he exploits it deftly. A Belgian by birth, Tramont has directed in France and worked in American television. In Hollywood he is best known as the husband of the high-powered agent Sue Mengers.

Streisand's presence may also be misleading, because Hackman has the crucial leading role. In fact, it's the most endearing role of his career, an impression of frustrated but resilient middle-class masculinity that should evoke as much recognition and rooting interest among men as women seemed to derive from Ellen Burstyn's role in "Alice Doesn't Live Here Anymore."

Where death inadvertently liberated Burstyn's Alice, it's a demotion that revives Hackman's George Dupler, banished to the job of night manager at an all-night drug store when he flips out and loses a middle-management position with the chain, Ultra Save.

The loss of status is a blessing in disguise. While overseeing his lethargic, inefficient night clerks and coping with the slightly weirded-out nocturnal clientele that frequents Ultra Save, George begins to loosen up and entertain ideas he'd virtually abandoned. He terminates an exhausted marriage (to Diane Ladd, who played Burstyn's waitress pal in "Alice") and tries his hand at a new career, invention.

Streisand's character, Cheryl Gibbons, is a wide-eyed flake who enters George's life because she happens to be having an affair with his son, a muscular, glowering young lout embodied delightfuly by Dennis Quaid, Cheryl's husband Bobby (Kevin Dobson) is a preemptory, macho fireman whose job often keeps him away nights. His unconcealed contempt is obviously demoralizing his daffy, ardent wife, although Cheryl herself is too dim to define the need that attracts her to more affectionate partners.

In a typical, telling moment of domestic slapstick, Cheryl is at the organ, struggling with a new song, and Bobby, engrossed in a massive model of a tank battle, keeps telling her to pipe down. Finally getting up the gumption to talk back, she shouts, "I can play too!"

Cheryl has aspirations toward Something Finer that express themselves rather forlornly. Her lyrics, for example, make Melvin Dummar sound like Irving Berlin. She considers lavender such a flattering shade that even her cigarettes are tinted lavender. George's demeaning job has an absurd romantic appeal for Cheryl, since she's just read something which describes night people as the New Pioneers. "You live a very exciting life," she tells him. "You live on the edge."

The weakness in the conception is that Cheryl and George don't really seem made for each other. The intellectual gap looks a little too wide for compatibility. Streisand is also acutely miscast as Cheryl, a role that suggests Marilyn Monroe. Streisand joined the project belatedly, perhaps as a personal favor to Mengers. The actress originally cast, Lisa Eichhorn, seems all wrong in a different way.

What makes the miscasting easy to forgive is the movie's consistent likability and Streisand's obvious sincerity. This is her first character role, and she gives herself to it selflessly, submerging all her own characteristic mannerisms.

Hackman more than compensates for the casting imbalance. His beefy, lived-in mug has never seemed more beautiful.He reflects the reawakening of pride, humor and vitality in George subtly, but by the time the movie fades out, to the strains of "La Violetera," the haunting tango from Chaplin's "City Lights," the feeling of contentment radiating from his face is positively sublime.

The major studios have a bad habit of brushing off good little movies, usually because they lose confidence in their ability to advertise them effectively. If a movie this sweet-tempered and appealing can't be handled properly by a company like Universal, perhaps the majors should confine themselves to remakes, sequels and self-evident clunkers.

The failure of "Melvin and Howard" could be demoraliizing Universal executives. "All Night Long" also takes a gentle, intimate, unemphatic approach to comic stylization. A crude, synthetic comedy like "Nine to Five" may be a safer commercial proposition because it treats viewers like dunces -- like Bobby treats Cheryl, come to think of it -- and signals all the laughs in advance. The laughs in a "Melvin and Howard" or "All Night Long" are more spontaneous and abundant, but they don't announce themselves. They're organic, a function of the situations and the interplay between the characters.

The funny stuff just happens. It's a constant in the cockamamie flow of life. For example, George's son answers the phone? "Yeah, Mrs. Phillips, I think she's on the toilet," he informs the caller and then bellows, "Hey, mom!" Upon her arrival, Mrs. Dupler picks up the receiver and gaily remarks, "Bonjour, Dorothy! No, I was just putting some Drano in the shower."

Even when Richter plants a classic niftie, it sounds wonderfully spontaneous. Inspecting the factory loft where he's destined to set up shop, George is asked his profession by the landlady. Smiling a bit sheepishly, he replies, "An inventor." She ponders that briefly and then remarks, "You got your work cut out for you, 'cause nothing they got now gets the job done."