I agree with Mike Nugent and I'll take it a step further. In my view, this begins with your intention. If you're developing code for yourself to sell and profit from quickly - that's one thing, but if you're creating something to grow the pie and help people improve their lives etc., then it is in the spirit of the effort to allow others to benefit in the same way.
The only condition being that all roads lead back to you. The universal law of effort and reward seems to always get it right. Focus on ways to exploit improvement and speed to market.
Any effort in the code world (with a few exceptions) should be built around a strategic plan that is long-term and full of partners.
For example, look at Matt Mullenweg - at one point he was faced with a similar decision.
Do you believe he made the wrong choice? Would his achievements to date with his "idea" have reached the position of today with a sales/ownership model?
In the end - his product is making money and will continue to do so because
almost anyone can take advantage of the platform to grow their ideas.
There are hundreds of others making these choices as well and while my example may be made up of differently positioned circumstances... the principle is exactly the same.
I would strongly consider the open source model for the reasons mentioned here - and it goes without saying "be smart about it"
Seek many advisors and consider the benefit you will receive from collective participation in improving your product as opposed to just you doing it.