Generators store transaction waiting to get into a block in their memory pool after receiving them. Received transactions are stored even if they are invalid to prevent nodes from constantly requesting transactions that they have already seen. The memory pool is cleared when Bitcoin is shut down, causing the network to gradually forget about transactions that haven’t been included in a block.
Malone, J.A (2015). Glossary of Bitcoin Terms and Definitions. United States: Lulu Press, Inc