I think I misread your issue.
Do you mean by “until the RAM is full” that you get an out of memory error or is the cached memory just really big?
In the latter case, I don’t think this is a memory leak.