I've been mixing it up. at the end of the ride its hard to get out of the saddle but if you're slowing to a stop and have some discomfort in the knees then get out of the saddle for a couple or 3 yards. don't be afraid to get off the bike to rest for 2 minutes, it won't kill you.
mostly, for me, on long climbs at the end of my rides, I'm in the saddle concentrating on keeping the pedals moving and keeping the bike upright. I don't care how slow I go or how slow my cadence is.