ctrl+c and destructors

Walter Bright newshound2 at digitalmars.com
Fri Oct 4 00:40:41 PDT 2013


On 10/3/2013 11:46 PM, Jacob Carlborg wrote:
> On 2013-10-04 02:08, H. S. Teoh wrote:
>
>> Reminds me of a GUI app I tried years ago, that suffered from some kind
>> of memory corruption bug. Every now and then it would segfault due to
>> hitting the corruption... one time, it *didn't* segfault, but continued
>> merrily on and corrupted all of my data -- worth many hours of work --
>> all without showing any signs of problems, and then out of habit I saved
>> the file I was working on, and it barged ahead and wrote garbage all
>> over my last good copy of the data. :-(
>
> I have had the same experience. We had to use an application in school that was
> notorious to crash and corrupt your files. I kept ten different save files,
> cycled through them when I saved. When it did crash it corrupt not just the file
> I was working on but five other of my ten save files. Of course, these we're the
> five latest files and the other were too old. That really sucked.


I think it's pretty clear that the solution to saving a user's work-in-progress 
is to have the application actually save the work-in-progress at regular 
intervals, not try to save it after it has crashed.


More information about the Digitalmars-d mailing list