XBMC (now Kodi) has always had a tendency of leaking memory, so that it will eventually thrash and crash. My simple solution to this is to run xbmc inside a for loop instead of directly (just run the script from
…And add the following to the local XBMC user’s crontab:
0 4 * * * killall xbmc.bin
This will kill XBMC every night at 4 o’clock. And give you a fresh XBMC every day!