"He was the pro and I was a rookie," Ostrum, now 58, said of he and Wilder's relationship on set. "[The crew] would break for lunch and Gene and I would always buy a chocolate bar and share it on the way back to the set."
Starring in Willy Wonka was Ostrum's first and only film role, as he left the business to become a veterinarian. Even though Ostrum told Variety he had not seen Wilder since filming wrapped on the 1971 movie, hearing the news of his death was "kind of like losing a parent."
"You know it's going to happen, but it's still a shock," Ostrum explained. "He was not in good health at the end and it was not unexpected by any means, but when it happens, it hits you like, 'Gene is gone and there will never be anyone like him again.'"
"He was a gentle man, but he was also a gentleman. He treated people with respect and dignity," Ostrum continued. "He was so quirky. You never knew what to expect from Gene. He never let on how he was going to read a line or convey an expression. That's why the film works, because he made Wonka so unpredictable."
Looking back, Ostrum says he'll forever cherish the memories he shared with the veteran actor, as well as Jack Albertson, who portrayed Charlie's grandpa Joe.
"To have made one film and to be associated with Jack and Gene, I feel like I really found the golden ticket," he gushed. "My gut feeling is that Willy Wonka wasn't [Gene's] favorite role, but that's the role now that people across the generations remember him for."
As ET previously reported, Wilder -- who also starred in such classics as Blazing Saddles, Young Frankenstein, and The Producers -- died of complications from Alzheimer's disease, which he had been battling privately for three years.
"We understand for all the emotional and physical challenges this situation presented we have been among the lucky ones -- this illness-pirate, unlike in so many cases, never stole his ability to recognize those that were closest to him, nor took command of his central-gentle-life affirming core personality," Wilder's nephew, Jordan Walker-Pearlman, shared in a statement given to ET. "It took enough, but not that."
"The decision to wait until this time to disclose his condition wasn't vanity, but more so that the countless young children that would smile or call out to him, 'There's Willy Wonka,' would not have to be then exposed to an adult referencing illness or trouble and causing delight to travel to worry, disappointment or confusion," the statement continued. "He simply couldn't bear the idea of one less smile in the world."
"He was 83 and passed holding our hands with the same tenderness and love he exhibited as long as I can remember," Walker-Pearlman concluded. "As our hands clutched and he performed one last breath the music speaker, which was set to random, began to blare out one of his favorites: Ella Fitzgerald. There is a picture of he and Ella meeting at a London Bistro some years ago that are among each or cherished possessions. She was singing 'Somewhere Over The Rainbow,' as he was taken away."
On Tuesday, Coldplay honored the screen legend by performing an acoustic version of "Pure Imagination," the Willy Wonka & the Chocolate Factory anthem made famous by Wilder, at the Pepsi Center in Denver, Colorado. Hear highlights from the British rock band's whimsical tribute in the video above.