XBMC on 1st Gen locks up

I’ve been ignoring this for a while but if anyone has an answer …

I leave XBMC running on my 1st Gen ATV constantly. After a period of time when I access the device again it has locked up and needs a reboot - this seems to be after 4or 5 days. If I do exit XBMC the device runs normally with no lock ups. Any ideas as to how to stop this.