PHP saves sessions to disk by default; it's only in memory while the program is actually running, so it would only be a memory issue if you had a lot of visitors simultaneously -- ie running your PHP code at exactly the same time on the same server.
But the amount of memory used by your session array is small compared with the memory used overall by your whole PHP process, so if you had sufficient simultaneous visitors for that to cause a problem, then it's unlikely that having a session for each of them would make much of a difference.
The real way to mitigate against this kind of thing is to make your programs run fast, so that they exit quickly, and thus there is less chance of having large numbers of copies of it running simultaneously.