I did not read the full code, however later in the patch the "if (parser)"
is kept in several places in similar statements, that's why I was
wondering. So if you are correct (and I guess you are), these could (should
?) also be changed accordingly.

The only reason to need the "if" I could think of is that there are some
unknown "side-effects" affecting objects which are created (or not)
together with "parser" ... and I guess this is unlikely.


On Mon, Sep 30, 2013 at 8:22 AM, Giulio Eulisse <notifications@github.com>wrote:

>  In RecoBTag/XMLCalibration/interface/CalibrationXML.h:
>
> > @@ -36,8 +37,8 @@ class CalibrationXML
> >
> >          void closeFile()
> >          {
> > -          if(errHandler) delete errHandler;
> > -          if(parser) {  delete parser; XMLPlatformUtils::Terminate(); }
> > +          delete errHandler;
> > +          delete parser; cms::concurrency::xercesTerminate();
>
> How does XMLPlatformUtils know about "parser"? Even if creating a parser
> registered itself in some global registry (which it does not, according to
> documentation), it would un-register on deletion.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/cms-sw/cmssw/pull/943/files#r6650749>
> .
>



-- 
Thanks,
       cheers, andreas