I don' think shutting it down is sufficient I got this message and closing it only solves this temporarily
the truth is you may need more Ram Memory it's very easy to fix if your under warranty Mac Won't help you exactly
but my machine is out of warranty it's a @ 2010 Macbook, 7,1 I can upgrade it I added 16GB Ram Memory from 4 which for risk of being sued Mac can't advertise it but it does hold it and no more messages
and I'm flying in speed Running High Sierra think about it my mac is 8 years old I can get at least two more years out of
and I'm editing videos which takes alot of space I upgraded my hard drive and I have 4 Terrabtye External
all like new Macs last a Long Time. Very Long time and the answer is if you can add more ram end of problem permanently learn how to change your ram on Youtube it's very easy and get the right screwdrivers , very easy just unplug any plugs or batteries while doing so any electricity connected Must be Taken off so as to not damage any electric current or fry the motherboard you are fine, good luck if you need anything Also there is a Hard drive cloner in case you ever need to clone your hard drive into a new one . you can buy your parts used or new online and all is well there is so much you can do with your Mac to upgrade it it's incredible .
Hope this helps you and all in the Future Mac Help