RE:[CINT] [Fwd: [ROOT] CINT C++ ext. warnin

From: Masaharu Goto (MXJ02154@nifty.ne.jp)
Date: Mon Feb 18 2002 - 13:20:58 MET


Hello Anton,

You are right. This is a Cint bug which has to be fixed.
I'll fix this in next release.

Thank you
Masaharu Goto


>Date: Thu, 14 Feb 2002 15:48:40 +0100
>From: Anton Fokin <anton.fokin@smartquant.com>
>To: roottalk@pcroot.cern.ch
>Subject: [ROOT] CINT C++ ext. warning
>
>Hi guys,
>
>I spent a couple of days trying to figure out why my server side script
>doesn't work.
>
>{
>TStock Stock = gDataManager->GetStock("SUNW_US");
>}
>
>has a typo, it should be TStock *Stock ...because gDataManager->....
>returns a POINTER to a stock object.
>
>It works fine in CINT producing no warnings/errors but what it actually
>does is horrible:
>
>- it creates new Stock object
>- it calls copy constructor to copy SUNW_US stock to this object, so
>that this new SUNW_US object gets registered in the datamanager and old
>object gets lost
>- after macro execution it deletes Stock object, removing its reference
>from datamanager
>
>Well, you should not read or understand all those details about R-Quant
>stuff but I just wanted to demonstrate how CINT C++ extension leads to a
>chain of catastrophic events....
>
>Is it good in general to have such possibility?
>
>Cheers,
>Anton
>



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:42 MET