Question: Should the background parser delete ParseJobs?

Milian Wolff mail at milianw.de
Mon Nov 2 17:17:34 UTC 2009


On Sunday, 1. November 2009 23:40:13 David Nolden wrote:
> Am Samstag 31 Oktober 2009 16:12:48 schrieb Milian Wolff:
> > Hi there!
> >
> > In ~BackgroundParserPrivate() the ParseJob gets deleted, but I wonder
> > why? I mean they are owned by the LanguagePlugin, no? Shouldn't they
> > delete the jobs?
> 
> Who says they are owned by the language plugin? Usually they are deleted by
> BackgroundParser::parseComplete, so the background-parser owns them.

OK, just rechecked with CPP and it doesn't set a parent for the Parsejob, 
while PHP still does. Will change it.

Should we add job->setParent(this) in 
BackgroundParserPrivate::parseDocumentsInternal ? Would potentially save us 
some code in the dtor, but only if we don't to set 
            it.value()->setBackgroundParser(0);

-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20091102/9b042974/attachment.sig>


More information about the KDevelop-devel mailing list