Hi. Alex I think I did not get your questions and sent the confusing answer.
TObject has it own TObject::new it has no separate ::new.
Please check whether your %ROOTSYS%/bin has libNew.DLL.
If it has this explains your troubles.
You should build Windows version of ROOT with no custom ROOT
operator "..new"
Best regards,
Valeri
----- Original Message -----
From: "Axel Naumann" <axel@fnal.gov>
To: "Roottalk@Pcroot. Cern. Ch" <roottalk@pcroot.cern.ch>
Sent: Monday, May 28, 2001 4:16 PM
Subject: [ROOT] TString::StrDup and MSVC
> Hi,
>
> Assume I execute a program built in debug mode, linked against the Root
> debug libs for Win. I call TString::StrDup from within a TObject derived
> class and delete [] it later on.
>
> TString::StrDup calls ::new(), and aparently a different "version" of delete
> is called from within a TObject derived class: I get an exception
>
> HEAP[analyzeDbg.exe]: Invalid Address specified to RtlFreeHeap( 990000,
> 147bd40 )
>
> (If you want to see that yourself: Run a program which links against the
> Root libs with an object of type TApplication; in your
> TApplication::TApplication the call
> if (fArgv) gSystem->SetProgname(fArgv[0]);
> will be forwarded to TWinNTSystem which allocates
> if ( IsAbsoluteFileName(fullname) && !AccessPathName(fullname))
> which = StrDup(fullname);
> and deletes
> if (which) delete [] which;
> causing the exception to be thrown.)
>
> Any idea why? Does the TObject::new/delete differ from ::new/::delete?
>
> Cheers, Axel.
>
>
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:47 MET