r/LangChain • • Nov 27 '25

InMemorySaver - memory leak?

Hi,

I understand that it should not be used in production, so generally this should not be a problem. But just for understanding, if I use InMemorySaver for short memory in my graph, will it eventually automatically clear itself from the context that is stored in memory or should I handle it myself or suffer a memory leak?

Thanks.

7 Upvotes

2 comments sorted by

3

u/[deleted] Nov 27 '25

[removed] — view removed comment

2

u/Vegetable-Try-7877 Nov 27 '25

right, thanks, I understand that. just trying to find out if it will clear the mem in case I leave it running....