I 'm using ORT C++ API to infer several models sequentialy. The consumption of memory is pretty much, so I try to unload some sessones after inference. However the consumption is not fully freed, and no memory leak detected. And I notice that the memory will be freed by the OS after a while (1 hour background alive), I guess, it might be recycled by the mechanism of system garbage collection. So I am wondering it is there some magic API to recycle the garbage, and I would like to know what cause the memory residents, the threads pooling or the weights? Is there a way to tell the OS to do recycle instantly? Thanks.
I 'm using ORT C++ API to infer several models sequentialy. The consumption of memory is pretty much, so I try to unload some sessones after inference. However the consumption is not fully freed, and no memory leak detected. And I notice that the memory will be freed by the OS after a while (1 hour background alive), I guess, it might be recycled by the mechanism of system garbage collection. So I am wondering it is there some magic API to recycle the garbage, and I would like to know what cause the memory residents, the threads pooling or the weights? Is there a way to tell the OS to do recycle instantly? Thanks.