If you're dead-set on culturing fruit flies for the plants instead of sourcing some other option (which, the fungus gnats that invariably show up in almost any organic soil are a free source, appropriate fertilizers are easy to apply to leaves with droppers or needles, crushed fish foods of various kinds can easily be sprinkled on them as well), it'll be easier to feed dead ones to the plants than live ones so dumping most of the container into another jar and waiting for them to expire gives an easier to handle and ready-at-hand source to just sprinkle on them. And since the plants do not need to be loaded with food at all times, even one or two rounds of cultures will provide enough flies for a very long time unless you have a really, really big collection (I stopped culturing flies for ended lizard and mantis projects a couple of years ago, and only just now coming up on running out of the dead flies with a whole lot of other options lined up to take over the next several years).