Can you provide some additional details? When does this happen? What version of Dynamic C? What do you think might be happening? Is something erasing the entire flash, or just part of it? Are you talking about the parallel program flash, or the SPI data flash?
Does your program include any code to write to the flash (like saving information to the user block)? Is this happening with a production unit in the field, or while you’re debugging with Dynamic C?