[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    RE: About memory allocation failures....
From:       "Schmidt, John" <John_Schmidt () compuware ! com>
Date:       2002-01-29 14:12:52
[Download RAW message or body]

Rodolfo Conde Martinez
> 	mmmhh.....havent check all the kde code....but isnt it free of
exception 
> checking (as it does code bigger and slower doesnt it ?? )....and i guess
not 
> all compilers have the -fno-check-new and -fno-exceptions like g++, so if 
> there isnt exception checking what happens ? the program just crashes ???
> wouldnt be a good idea to set a function handler in the kdelibs maybe or a

> handler apropiated for each app ??

If a compiler doesn't return an error/exception upon failed allocation of an
object
due to short-on-storage... BAAAAAAAAAAD compiler, and I'd suggest finding
another.  As far as not coding for exceptions... BAAAAAAD coding!!  It
should
only be slower (if you can notice it) when an exception occurs, which
hopefully
won't be often!  Yes, exceptions not handled usually cause a crash, so what
would you rather have, a barely noticable difference for coding for
exceptions, or
big ugly core dumps?  However, exception coding needs to produce a message 
that:

1) End users can understand and actually help them... unlike MS.
2) Provide minimal doc for a maintenance toad to kinda/sorta know what went
   wrong.

John Schmidt
ServerVantage Development
Compuware Corporation
john.schmidt@compuware.com
http://www.compuware/products/vantage
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic