Is it a valid concern that a PhD student runs out of research ideas? A PhD student "Alex" has a few years to impress their research lab advisor and then their dissertation committee.  During these years, I imagine that Alex will come up with some great ideas that can be modeled, simulated, and perhaps validated with physical experiments, etc.  It might feel that all of Alex's work "belongs" to the lab, and namely, to their lab director / advisor.  Then after several years of working at such a high-energy pace, does Alex have to worry about running out of ideas, and that they gave all their ideas away to their advisor?  Or does Alex have so much more to gain from sharing all of their best ideas and then receiving crucial feedback in return, and that the benefits far outweigh the 'costs'?
Research ideas tend to grow exponentially. 


At the beginning, Alex is a student who doesn't know what's already been done -- no ideas (though maybe some interests)
As an undergraduate, Alex will start to have ideas based on what he reads and his experiences. Many of these will be off-topic, already done, or impossible.
Then Alex will spend time doing research "at the cutting edge" -- usually on someone else ideas (i.e., his advisor's). He'll now start to understand where the gaps are and what ideas could be developed, adapted, or applied to plug these gaps. Some of these ideas could be valuable.
As Alex continues to read the journals and perform his own research, he'll identify more and more ideas. The limiting factor is time: having ideas may be fast, but taking an idea from conception to publication always takes a long time, so Alex normally has a long list of ideas in the back of his mind. 


So yes, Alex will gain by discussing his ideas with his advisor. In most cases though, students start by work on their advisor's ideas, which they gradually make their own and begin to supplement with their own ideas as they mature.