Crash when creating a KHTMLView

Andreas Kling kling at impul.se
Sun Aug 14 23:58:11 BST 2005


On Friday 12 August 2005 13:52, Andreas Kling wrote:
> On Thursday 11 August 2005 10.30, Andras Mantia wrote:
> > As I saw ref/deref is done in the constructor destructor, so what about:
> >
> > KHTMLFactory *factory = new KHTMLFactory();
> > accessKeysEnabled =
> > KHTMLFactory::defaultHTMLSettings()->accessKeysEnabled();
> > delete factory;
>
> That's all right, but something like:
>
> KHTMLSettings *settings = new KHTMLSettings();
> accessKeysEnabled = settings->accessKeysEnabled();
> delete settings;
>
> ...would create one less object. It still parses the configuration file
> another time, though, which is pretty ugly.

Yeah okay, I was talking out of my socks here.
Creating a new KHTMLFactory is way better than creating a new KHTMLSettings.
Mr. Mantia had it right all along. Sorry ;-)

-- Andreas




More information about the kfm-devel mailing list