June 09, 2004
"Walter" <newshound@digitalmars.com> escribió en el mensaje
news:ca7led$99n$1@digitaldaemon.com
| <hellcatv@hotmail.com> wrote in message
| news:ca6kbl$1of7$1@digitaldaemon.com...
|| why not run the destructors all dead objects at the end (in the atexit)?
|| that should solve the problem, no?
|
| Sometimes people don't want to do this for performance reasons. Also, it's
| rather pointless for cleaning up resources, since the OS will already
clean
| up any resources held by an exiting program.

Correct me if I'm wrong, but I recall once reading that Windows 98 (and any 9x, I suppose) didn't correctly clean up memory. And that might be true considering how bad my work's computer performs after opening and closing many applications, which doesn't happen in my home's XP.

-----------------------
Carlos Santander Bernal


June 09, 2004
In article <ca8292$tas$1@digitaldaemon.com>, Carlos Santander B. says...
>
>Correct me if I'm wrong, but I recall once reading that Windows 98 (and any 9x, I suppose) didn't correctly clean up memory. And that might be true considering how bad my work's computer performs after opening and closing many applications, which doesn't happen in my home's XP.

The home versions of windows before XP basically didn't do any resource management.  Memory fragmentation and the like were extremely common.  But I'm not sure how far this extended where normal application termination is concerned.

Sean


June 10, 2004
Walter wrote:

> "Stewart Gordon" <smjg_1998@yahoo.com> wrote in message
> news:ca7emf$30cm$1@digitaldaemon.com...
<snip>
>> (a) it's necessary to manually call this function on exit to make sure everything's destructed?
> 
> Yes. But recall that this is rarely necessary, the OS will routinely clean up any dangling resources on the exit of a process.
<snip>

Yes, Win98 seems to free system resources when the program exits, as I discovered while fixing Empire.  I'm quite sure Win3.x didn't, but that's history now.  And I'm not sure about Win95.

Also, if a file/database class has write-caching, it's important to make sure the changes are indeed finally written out.  While doing Fortran stuff it didn't take me long to notice that if an output file isn't closed when the program exits, there tends to be quite a lot of lost output that never made it to the file.  But then again, Fortran has its quirks, like FLUSH being nonportable....

Of course, if the app is supposed to be failsafe, it would manually flush the cache from time to time anyway....

Stewart.

-- 
My e-mail is valid but not my primary mailbox, aside from its being the unfortunate victim of intensive mail-bombing at the moment.  Please keep replies on the 'group where everyone may benefit.
1 2 3
Next ›   Last »