Crash when creating a KHTMLView
Andreas Kling
kling at impul.se
Wed Aug 24 22:08:46 BST 2005
David Faure 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 ;-)
>
>
> I don't see how. The ref/deref solution has the advantage that no factory needs to be
> created at all, if there's already one. Can you apply the ref/deref solution instead,
> if it works for you?
>
The ref/deref solution was dropped due to complaints about adding a
friend class, but if you think that's okay, we'll go with that.
So what do you think? ;)
-- Andreas
More information about the kfm-devel
mailing list