All you have to do is have some method of proofing you created the idea. Hard with software, but with my music for example, I am the only person who owns the source files. If someone released one of my tunes without my permission, I would take them to court and prove I was the author with the source files.
It's harder with code, but you don't even have to register anything, so long as if someone does you over and you take them to court, you can prove its your work. The old mailing it to yourself trick is myth. It's not conclusive proof and can be easily faked.