Just to quell your fears, your Photos are still there on your Mac.
The bad part, is I have never ran into this is issue and have looked into it and I find the the Application memory full issues can be caused by many things.
The reason I need you to install and run Etrecheck, is because I need to see if your system is running ANY incompatible software or malware that is bad for your Mac, in general.
I will ask you some questions , instead.
Do you run any antivirus software on your Mac? Antivirus software can slow down the normal operation of OS X and can have negative effects on OS X system performance and general operations.
Do you have "garbageware" apps like MacKeeper or any other "junkware" maintenance apps like CleanMyMac 1 or 2, TuneUpMyMac or anything like these apps, installed on your Mac? These types of apps, while they appear to be helpful, can do too good a job of data "cleanup" causing the potential to do serious data corruption or data deletion and render a perfectly running OS completely dead and useless leaving you with a frozen, non-functional Mac.