Tool to purge the Nvidia video memory cache without having to restart the machine?

This happens in 3ds max as well as Unreal Engine…
In max I’ll render an image, takes long time at high resolution, then I render the image again after making changes, but then the software crashes and I found out it ran out of video memory…

In Unreal editor I’ll do bake lights, it works… then I make a change to the scene and rebake and it crashes, due to video memory ran out of space…

Right now I only have gtx 1060ti, 6GB video memory… the problem is the application doesn’t give all the memory back, so the second time it runs out…

If I reboot it gives all the memory back, but is there a tool that can do this without having to reboot each time?