A gun will work out cheaper in the long run and should give you better results given that you can adjust the flow rate.
The cannister, if only buying a one or two is only slightly cheaper than the non-gun version but the straws often become clogged and you bin them.
As per the responses above, I have left the foam in a gun for up to half(?) a year. Letting a squirt out from time to time helps. I also read that it is important to store the gun upright.
My last gun was about £30. It has a PTFE pin. I have now had it for a couple of years. I do spray the end with acetone cleaner after each use though.
When I first purchased a gun, I made the mistake of flushing it with gun cleaner and leaving the gun as is- it never worked after and wasn't the type which could be disassembled. I have since discovered that the foam canister should be left on.
That said, I did spend a tenner on one from Amazon and it stopped working after about 3 weeks. Both of my last two guns often sat on scaffolding for a few weeks at a time. The £30 Roughneck one has been fine thus far, I particularly like that it is supplied with two straws and two conical nozzles (which taper down to 2mm). Now that I am happy with the longevity of it, if it falls off the scaffolding, gets lost, etc, I would consider the £50+ version which has more PTFE elements.
A gun gives you so much more control.