Free memory when board is destroyed