I have no arguments with the previous posts, all are valid and correct. Some other things to consider:
What's your proficiency level in the water? New,novice, or out of shape swimmers burn A LOT of energy when just getting started.
How long is each of your swimming sessions? For the length of time, you may be burning a lot more energy than you would on a treadmill for the same duration. Proper food energy levels help here.
In either case, you'll need to stock-up on energy prior to, and hydrate throughout your swim.
In a 1.5 hour swim I can loose more than 3 lbs... thats' nearly half a gallon of water. Be safe out there!
Btw - I've been swimming for 36 years, and coaching for 15.