Cheap Yellow Display Hangs

I have a CYD which connects to an ESP32D, via wifi, to control the down stairs lights. The ESP32D works flawlessly but the CYD hangs and the touch screen becomes unresponsive after about 10-12 hours. I have all the controls working but I have a clock as the screen saver which kicks in after 30 seconds. Once the screen (as the date and time) is touched, the date disappears and the main screen is displayed so the lights can be controlled again.

I have tried controlling the lights, controlled by the ESP32D, via my mobile and they work fine. The only thing I can think of is that the CYD is maxing out its memory forcing the screen to become unresponsive and when rebooted it starts working again. I am now stumped.

Is there a way of clearing the memory periodically, or forcing it to reset every 6 hours or so?

The only other thing I can think of is....... it has something to do with the date screen. It uses time.h to get the date and time. If time.h fails to get the date I think it loops every so often, using pool.ntp.org, trying to get the date again. I'm not sure if this can have an effect on the entire program..... looping internally causing the screen to fail.

I'm not sure it is that, I think it's a memory issue and just needs purging periodically or a screen reset to fix it.

Any help will be appreciated.

Nobody can help if the code isn'y visible. First use Tools/Auto Format, then Edit/Copy For Forum than reply to this and do a Paste (Ctl-V or Cmd-V for Mac)

How do you pragmatically reset a CYD? In the docs it states the GPIO pin is -1

What docs?
You need to provide us with a link to the documentation and the display you are having problems with as crystal balls are in short supply at the moment.

@lexter333, please do not cross-post. Threads merged.