Volvo 745 Sometimes stalls out of nowhere when driving but starts right back up

My volvo 745 Sometimes idles very rough out of nowhere almost stalls but when i press on the accelerator it runs like normal and it sometimes stalls when driving but the car starts right back up like nothing happened. If you want more details ask and i will answer
0