in general, Flink uses user-code class loader for job specific code and the lifecycle of the class loader should end with the job. This usually means that job related code could be removed after the job is finished. However, objects of a class that was loaded by the user-code class loader should no longer be referenced from anywhere after the job finished or else the user-code class loader cannot be freed. If that is the case depends on the user code and the used dependencies, e.g. the user code might register some objects somewhere and does not remove them by the end of the job. This would prevent freeing the user-code and result in a leak. To figure out the root cause, you can take can analyse a heap dump for leaking class loaders, e.g.  and other sources on the web go deeper into this topic.