On the other hand, you may just want to patent something to prevent exactly that from happening. Holding a patent does not require you to make money off of it, but it does prevent others from doing so. It's a bit sad that one has to go this far, but there you have it.
You want to ensure the technique remains available to anyone freely: patent it and publish it along with permissive licenses.