I've had the battery off several times. There is a relearn procedure, running with AC on and off but even if you don't do that the engine should not stall out. Sounds like you have other problems. Plugs, MAF dirty, throtle body dirty, air filter dirty. Check for codes.
The computer will "learn out" on it's own with apprx 50 miles of normal driving----The more mods you have the longer it takes---The ECM re-sets the fuel trims to "0" when disconnecting the battery--
Doing an Idle relearn will do the same thing as dis-connecting the battery and will re-set the fuel trims to "0"--so nothing gained by doing that--it just has to learn out