In 1964, Jack Warner published his autobiography, “My First Hundred Years in Hollywood,” and amusing as the title may have been (much of the book is equally sardonic), he fell far short of the century mark. Ironically, the actor who ought to have earned that title was Olivia de Havilland, having reached the age of 104 before her death this weekend — ironic not only because de Havilland scored a legal victory over Warner Bros. that changed how the studio system operated, but also because the character for which she is best remembered, as Melanie in “Gone With the Wind,” expires before the end credits.

“I am sure we have both forgotten what happened twenty years ago,” Warner wrote in his memoir, referring to the 1943 court battle that “established once and for all — and this was probably good for everyone concerned — that no studio could tie up a player longer than seven calendar years, and that the suspensions [which Warner tacked onto their contract, whenever they declined a role] cannot be used to extend the time.”

When Warner refused to let her out of the deal, de Havilland sued — and won. But it was hardly her only fight with Hollywood, the most recent being over Ryan Murphy’s depiction of her in “Feud.” Though focused on the rivalry between Bette Davis and Joan Crawford, the miniseries hints at a similar rivalry between de Havilland and her younger sister, Joan Fontaine — a competition heightened by the fact Fontaine was the first to win an Oscar.

In his memoirs, Warner wrote of de Havilland that she “had a brain like a computer concealed behind those fawnlike brown eyes.” And as proof, he describes how the actor talked him into loaning her out to MGM so that she might play Melanie in “Gone With the Wind”: de Havilland appealed to Warner’s wife, Ann, who made the pitch on her behalf. “I hear that Selznick wants Livvy in ‘Gone With the Wind,’” Ann began. “Can you possibly imagine anyone else in that role?”

And so de Havilland got her way, landing the role that changed the course of her career entirely. There was the acclaim, of course. The part earned de Havilland the first of five Oscar nominations. But more significant was the fact that de Havilland — best known at that point as the lovely young lady who fell for Errol Flynn in film after film at Warners, from “Captain Blood” to “The Adventures of Robin Hood” — shattered the mold into which she’d been cast at her home studio, the one where she was locked under contract for seven years.

During the ’30s, de Havilland later told interviewer Paul Ryan, “I had been playing ingenues, and their experience is very limited as characters in a film. They meet the hero … eventually they fall in love … and then finally they get together.” In “Gone With the Wind,” she saw an opportunity. “But Melanie went through a whole war, she went through childbirth, she died. She went through all kinds of experiences, and this was a rich human life to interpret.”

De Havilland worked for six months on the epic production, which went on to become the most beloved American film of all time — a reputation very much under re-evaluation today, as critics of the movie make the case that it romanticizes the slave-holding Southern values that were vanquished by the Civil War. But it was hardly a sure bet at the time, and while there was considerable excitement and publicity stirred up around the production, “Wind” went through multiple directors and no shortage of setbacks.

Eighty-one years later, it stands as the most spectacular film of Hollywood’s so-called “golden age” — an era of which de Havilland was virtually the last survivor. Amid the Technicolor sunsets and stunning crane shots, the sweeping score and smoldering romance — which turns on the fact that Scarlett and Melanie both love the same man, Ashley Wilkes — it’s easy to overlook the subtle feat that de Havilland accomplished in landing the role that she wanted. Much fuss was made over who might be cast as Scarlett O’Hara, but the part of Melanie succeeded in expanding the range of roles “Livvy” was offered.

No longer limited to playing the ingenue, she was subsequently offered the chance to embody more complicated women, including those who showed their resilience over a span of years. Indeed, her two Oscars were earned for playing such characters: a single mother dedicated to recovering the son she was forced to surrender in “To Each His Own” (1946) and the title character in William Wyler’s “The Heiress” (1949). The latter film, a costume drama adapted from Henry James’ “Washington Square,” may be the defining role of de Havilland’s career, in that it gave the actor the richest trajectory.

Over the course of the film, de Havilland goes from being the dowdy, unmarriageable daughter of a disappointed father (Ralph Richardson), who’s convinced that her lone suitor (Montgomery Clift) is interested only in her fortune, to an assertive independent woman, capable of standing up to both men. It’s rather surprising to see de Havilland, whose composure and elegance were such integral aspects of her image, play someone whose own father perceives as worthless. In the film, he describes her as “an entirely mediocre and defenseless creature with not a shred of poise,” which couldn’t be further from the truth — although de Havilland embraced that blundering naivete for the role, so that this seemingly pathetic heroine might find her strength.

In the last half hour of the film, audiences witness de Havilland at the height of her powers. On screen, so often she played characters caught in the shadow of other women. But that’s not the case with “The Heiress,” in which de Havilland must define herself in relation to cruel and manipulative men. Her climactic decision surely ranks among the most anti-romantic scenes in Hollywood history, and yet it isn’t necessarily tragic. The expression on de Havilland’s face suggests a defiant kind of triumph — success on her own terms, and the sort of determination that she’d brought to bear in taking on her studio several years earlier.

The 1943 court victory liberated her and several other stars, including Bette Davis (from whom de Havilland had stolen the lackluster “In This Our Life” by falling for director John Huston), who later invited her to take Joan Crawford’s place on “Hush…Hush, Sweet Charlotte.” The two actors — Davis and de Havilland — had enormous respect for one another. Davis arguably had no rival in terms of talent, and de Havilland claimed to have learned much from her on “Charlotte.”

But Davis was admiring as well, asserting in the foreword she contributed to Tony Thomas’ “The Films of Olivia de Havilland,” that her friend “overcame her beauty to triumph as an actress.” De Havilland overcame far more than that, taking on the system itself to carve out a place in which she might play the roles that interested her, rather than those that Warner and the men who ran Hollywood had in mind.