[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: How to handle Out-of-Memory in Konqueror?
From: Rolf Magnus <ramagnus () kde ! org>
Date: 2004-02-25 12:59:02
Message-ID: 200402251354.38867.ramagnus () kde ! org
[Download RAW message or body]
On Wednesday 25 February 2004 11:12, Luciano Montanaro wrote:
> > First thing: I will have to catch the exception? Or is it enough to check
> > for zero as return value from new() ?
>
> new always returns a valid pointer unless you use nothrow
Or unless - which is by default the case in KDE AFAIK - exceptions are
switched off through the compiler command line.
> (e.g. QString pippo = new(nothrow) QString(1000); will return 0 if the
> space can't be allocated.)
No, that will produce a compile error ;-)
And you don't really want to dynamically create QStrings.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic