Re: Static code analysis (cppcheck)
Philip Martin wrote:
> Julian Foad <julian.foad_at_wandisco.com> writes:
> >> To remove the warning I suppose we could drop the app variable, i.e.
> >> new QCoreApplication(...)
> >> instead of
> >> app = new QCoreApplication(...)
> >> but that might prompt other warnings.
> > The existing code creates the object and (though it never uses its
> > address) never destroys it. With your change, the object would be
> > created and then immediately destroyed. That doesn't seem likely to be
> > what's needed, though I'm not sure exactly what is needed here.
> No, it would not be immediately destroyed. Code outside Subversion may
> destroy it via the singleton interface, but in most cases it will exist
> until the application terminates.
Oh, right, I see. Yes. I had to go and refresh my distant memory of C
++ programming before writing that, and I still got it wrong. :-(
Received on 2011-06-30 12:03:12 CEST
This is an archived mail posted to the Subversion Dev