Unfortunately this sort of thing is very difficult to debug unless we have an easy way to replicate it... I'm not saying there _is_ a memory leak, just that it's a possibility. Unfortunately, most modern memory management systems are "lazy" in that when you release allocated memory it doesn't always immediately return to the free memory pool. Swapping also can be very hard to gague, as modern operating systems may swap when they don't actually need to, ostensibly to achieve better performance. This is why most linux machines used for scientific computing are configured with zero swap space nowadays (if there isn't any it can't be used).
Why would it do that, you ask? Let's say you're running windows and have photoshop running and it's eating up 20 of the 32 GB on your desktop machine. You then open Illustrator to do some work with it. Say Illustrator only needs 10 GB of RAM itself, however, it's accessing 8 GB of files on disk, which it may need to access repeatedly. One of the things the operating system does with RAM is to cache disk files in RAM for faster access. Ostensibly it only does this when the memory is free. With modern swapping policies, it may decide that since you're actively using Illustrator right now, it would make sense to swap 8 GB of the RAM Photoshop is using to disk, so it can use the 8 GB to buffer the files you need to access in Illustrator, in case you need to read/write them repeatedly. This will make Illustrator run a lot faster, but when you switch back to Photoshop you'll have to wait a few seconds for it to swap its 8GB back in from disk. This goes under the assumption that you have multiple things open, but are really only using one of them at a time.
If you extend this behavior to Linux workstations doing scientific computing, though, where you DO have big jobs using most of the RAM running, then this aggressive swapping behavior can make the jobs run MUCH slower because it may take part of your job running in the background and swap it out to disk in favor of making other things potentially faster.