Will it work? Yes. If you cook a seed, it won't sprout.
Honestly, though, I can't see how this would be a good use of time and
energy, or a viable solution for a garden of practical size.
Some of us use a "rot barrel" where nasty seeds are chewed up, free of charge, by anaerobic bacteria. It works, though it takes time, and it stinks like hell. But a year later, you can add this nasty goo, in small amounts, to your
compost, force it aerobic, and ultimately it's just plant food. It's lazy and stinky and quite effective, if you have the patience.
My 2c.
Edit: Wait, what, you have cantaloupe growing wild? I personally have some difficulty perceiving this as a problem. But we live in different climes.