When a famous detective bites the literary dust there is only ever one culprit: the author, in the study, with the pen. Tomorrow, a television era will draw to a close with the last ever episode of A Touch of Frost. The real mystery that will grip viewers, however, is exactly how the grumpy Detective Inspector Jack Frost, played by David Jason, make his exit after 17 years on our screen.
The ending of the two-parter (the first episode is broadcast tonight) is a closely guarded secret. In fact, two endings have been filmed to prevent leaks. "Whether he just hangs up his hat or is carried out feet first remains to be seen," Jason said.
To kill or not to kill your detective is one of the biggest dilemmas successful with which crime authors have to wrestle.
Television crime writer and Alex Rider author Anthony Horowitz, who created Foyle's War, said he would never kill off his char- acters, but added that for an elderly author a death at least ensures no one else can come along and take the character on.
"I'm very glad I didn't kill Foyle when ITV axed the series last year, because they've just decided they want to bring it back," he said. "I put a bullet in Alex Rider at the end of the fifth novel and I was inundated with letters from parents and children. I had no intention of killing him – it was a cliffhanger. I don't like killing off my characters. They are so much a part of me. Why should I kill them? I'd prefer them to go into gentle retirement."
Ruth Rendell, who writes the best-selling Inspector Wexford novels, explained why she would never write out her creation.
"I wouldn't want to kill Wexford because I wouldn't want to bring him back, and that's what people find they have to do," she said.
"I think it was an awful mistake to kill Morse because he was so popular. I don't know if Colin Dexter regrets that at all. I don't know how Wexford will end. I've got a few ideas, but I can't tell you because I will be inundated with mail. I may do nothing. He may just go on."
Colin Dexter, the creator of Inspector Morse, has no regrets about the death of his detective, however.
"I didn't kill him off," he said. "He died of natural causes. He drank a bottle of Glenfiddich every day, tried every day to give up smoking, and took pride in never taking any exercise. It was always to be expected that the old boy wouldn't last too long.
"We had done 33 episodes and he aged and grew less fit as we went. He was over 60 and we don't want a doddery old boy solving crimes. I also felt I'd said enough about him. Fans were only really bothered about the relationship between Morse and Lewis and I was getting a little bit cliché ridden."
He added: "I won't bring him back. Resurrections haven't got a good record – and some bishops might argue not even the greatest Resurrection of all.
"I've written a couple of short stories about him as a teenager at Oxford University, but it's a good idea to say 'that's enough'."
Starsky and Hutch
Starsky and Hutch were tough, cool but also sensitive in this pioneering buddy cop show renowned for its jazz-funk theme tune, red Gran Torino and hip snitch called Huggy Bear. Paul Michael Glaser and David Soul played the cops who policed the streets of fictional Bay City in California for 93 episodes between 1975 and 1979.
With his pipe, cocaine habit and sidekick Dr Watson, Sherlock Holmes has provided the template for the brilliant but flawed detective. Arthur Conan Doyle wrote 56 short stories and four novels between 1893 and 1927 and the character has been played by numerous actors, most recently Robert Downey Jr.
Poirot, Hercule Poirot
The famous Belgian was created by crime-writer supreme Agatha Christie. Hercule Poirot appeared in 33 novels and 51 short stories between 1920 and 1975, often alongside his friend, Captain Arthur Hastings. Since 1989, David Suchet has embodied the polite but stern detective in 64 episodes of Agatha Christie's Poirot for ITV.
A Touch Of Frost, Jack Frost
Ill at ease with the modern world, shambolic and always at odds with his superiors – in particular his boss, Superintendent Norman Mullett – Frost has solved numerous murders in the fictional English town of Denton in 42 episodes since 1992. David Jason cast off Del Boy to bring R D Wingfield's grumpy but warm detective William Edward "Jack" Frost to life.
Crossword-loving Morse cleared up murders aplenty in Oxford with his sidekick Lewis since his creation by the author Colin Dexter in 1975. John Thaw brought him to life in 33 television episodes between 1987 and 2000.
Monk, Adrian Monk
Former homicide detective Adrian Monk, played by Tony Shalhoub, has OCD which is no good for the San Francisco police force. But his attention to detail has won him cases and ratings in the 125 episodes between 2002 and 2009.
Dixon Of Dock Green, George Dixon
PC George Dixon was the lowly beat bobby who was just as much concerned with the welfare of his east London community as he was with solving the low-level crimes that came his way. Played by Jack Warner, the character was famous for his "Evenin' all" catchphrase. The show ran for 432 episodes from 1955 to 1976.
Heartbeat, Nick Rowan
Nick Rowan pottered about on motorcycles in the fictitious Yorkshire town of Ashfordly for this 1960s-set series, which relied heavily on the era's music but not its sex or politics. The cosy show began in 1992 and initially starred Nick Berry. Rowan bowed out in 1998, after 96 episodes.
Taggart, Jim Taggart
"There's been a murrrrder" was the favourite saying of Jim Taggart – and often they were pretty grim and gruesome. The actor Mark McManus played the tough Glaswegian cop based in Maryhill police station until his death in 1994. The show, first broadcast in 1983, has continued without him, albeit with a different detective, and is now up to its 103rd episode.
The Shield, Curtis Lemansky
Curtis "Lem" Lemansky, played by Kenny Johnson, was the rogue cop with a conscience in the cult US drama The Shield, causing friction with his three buddies for 88 episodes between 2002 and 2008 as they policed LA.
Cagney and Lacey
Christine Cagney and Mary Beth Lacey brought a new feminism to TV as a couple of tough broads – one married, one single – dealing with rape and alcoholism in New York, in 125 episodes between 1982 and 1988. Sharon Gless and Tyne Daly starred.
Magnum, P.I, Thomas Magnum
Thomas Magnum, private investigator, lived the high life in a 200-acre beachfront estate in Hawaii as the guest of an unseen author. Helped by English estate manager Higgins, he solved cases for clients who, more often than not, were beautiful women. Tom Selleck starred in the 162 episodes between 1980 and 1987.
Dempsey and Makepeace
Opposites attracted in this odd-couple drama which paired working-class New Yorker James Dempsey with Lady Harriet Makepeace, as played by Michael Brandon and Glynis Barber. The tension of the show's 30 episodes between 1985 and 1986 was more will-they-or-won't-they than whodunnit.
Life On Mars, Sam Tyler
DCI Sam Tyler travelled back from the Noughties to the 1970s in this coma-induced suspension-of-disbelief storyline which allowed the writers to put a modern cop in a Sweeney-style milieu. John Simm starred in the popular 16 episodes between 2006 and 2007, and the 1980s-set sequel Ashes to Ashes has just returned.
Prime Suspect: Jane Tennison
DCI Jane Tennison of the Yard was the queen of police drama in Lynda La Plante's Prime Suspect. It was played with award-winning aplomb by Helen Mirren, with gritty storylines that took on issues such as sexism, prostitution, child abuse and paedophilia. Tennison's no-nonsense tough exterior masked a battle with alcoholism as the 14 episodes – normally more than an hour long – progressed between 1991 and 2006.
We know who they are: the greatest fictional detectives ever. We know, too, that their stories have come to an end. But what we want to test here is how their creators drew a line under their careers. Match the question to the investigator above (answers below)...
1. Producers were going to bring which high-living detective down with a mobster's bullet, but relented due to an outcry from some of his 18 million fans?
2. Which smartly turned-out, wax-moustachioed detective died from a heart condition after pushing his medicine out of reach, when he himself became the murderer in his last case?
3. This detective may be taken out feet first, or might live happily ever after.
4. Which New York cop had his best friend fraught with worry after being laid low by a criminal's bullet in the last episode? He was scheduled to die so that he could be replaced by his television brother, but producers saved him and axed the show instead.
5. These two detectives have survived everything from shooting to rape to alcoholism and lived to see three "reunions" in the 1990s.
6. Which tough-talking Scottish detective was buried in a 1995 episode called "Blue Orchid", yet the show still continues with his name?
7. Which mobile officer swapped two wheels for four legs by emigrating to Canada to become a mountie?
8. This detective was so committed to ending the reign of his nemesis, Professor Moriarty, that he fell with him over the Reichenbach Falls during a fight in 1893. He returned 10 years later, because of public demand.
9. Which queen of TV detectives retired after a devastating final episode in which she battled with the bottle and dealt with the death of her father?
10. Which detective was so stuck in the past that he leapt from a police station roof?
11. Which detectives married in real life after their obvious on-set chemistry gave their series the sexual tension it is remembered for?
12. This obsessive detective was poisoned in the final episode, but fortunately had a few days to find a cure.
13. Which beat bobby rose from the dead after being shot by Dirk Bogarde in The Blue Lamp to live long enough to retire after his long-running series?
14. Which rogue cop fell out with his friends, one of whom blew him up by dropping a grenade in his car?
15. This cerebral cop died from "natural causes" after paying the price for a lifetime of beer and whisky drinking, and physical laziness.
Answers 1. Magnum; 2. Poirot; 3. Frost; 4. Starsky; 5. Cagney and Lacy; 6. Taggart; 7. Nick Rowan; 8. Sherlock Holmes; 9. Jane Tennison; 10. Sam Tyler; 11. Dempsey and Makepeace; 12. Monk; 13. George Dixon; 14. Curtis Lemansky; 15. Inspector Morse