That should be fine — the memory usage should not grow forever.
I don’t remember exactly which versions of Flink had this problem, but a few versions ago there was a bug in the version of rocksdb we were using at the time that would sometimes lead to out-of-memory errors. So if you are having problems, try upgrading to a newer version of Flink.