Final cut pro using all memory
I've been using this computer with Final Cut Pro X since the summer with no issues, until today. Randomly while editing FCP froze up causing me to force quit it, this has happened before and after reopening it usually works again. Except this time it did the same thing, so I force quite reopened once again and it still froze. I cannot even click anything once FCP is open because it just freezes and does the rainbow spinning wheel. After a while of doing this I got the message of "your system has run out of application memory" and tells me FCP is using 69GBs of memory which it can't handle. I've never had this issue before and I used to use a 2013 iMac for 7 years using FCP with absolutely no issues like this, I can't even upgrade my ram because i have the 21.5" 2017 iMac. Can anyone help?
iMac 21.5" 4K, macOS 10.14