The standard "pin valve" paintball co2 tanks will seal the tank to off automatically when they are unscrewed from the gun...it's basically like the valve stem on a car tire. BUT whatever co2 is in the gun will vent out.
The on/off type 3.5oz. tanks (and you once could get hose on/off type tanks in 9oz. as well) are only sealed shut when the knob is moved to "off". Will still vent the gas inside the gun once the tank is unscrewed. BTW: even off the gun, if you turn the valve to "on" the tank will jet out it's co2.
IF you add a seperate on/off to the rifle, then when it is turned to "off", the rifle will retain whatever co2 is in the gas tube when the paintball tank is removed....kind of like a mini-bulk fill once the tank is detached. There isn't a lot of volume inside a QB79 tube, so it wouldn't hold a lot of shots once it is gassed up and the tank detached, but would get at least a few full power shots that way.