Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't reset global in TClass::New #10

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 24 additions & 9 deletions core/meta/src/TClass.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3925,8 +3925,9 @@ void *TClass::New(ENewType defConstructor) const
// FIXME: Partial Answer: Is this because we may never actually deregister them???

Bool_t statsave = GetObjectStat();
SetObjectStat(kFALSE);

if(statsave) {
SetObjectStat(kFALSE);
}
TVirtualStreamerInfo* sinfo = GetStreamerInfo();
if (!sinfo) {
Error("New", "Cannot construct class '%s' version %d, no streamer info available!", GetName(), fClassVersion);
Expand All @@ -3939,7 +3940,9 @@ void *TClass::New(ENewType defConstructor) const

// FIXME: Mistake? See note above at the GetObjectStat() call.
// Allow TObject's to be registered again.
SetObjectStat(statsave);
if(statsave) {
SetObjectStat(statsave);
}

// Register the object for special handling in the destructor.
if (p) {
Expand Down Expand Up @@ -4008,7 +4011,9 @@ void *TClass::New(void *arena, ENewType defConstructor) const
// Do not register any TObject's that we create
// as a result of creating this object.
Bool_t statsave = GetObjectStat();
SetObjectStat(kFALSE);
if(statsave) {
SetObjectStat(kFALSE);
}

TVirtualStreamerInfo* sinfo = GetStreamerInfo();
if (!sinfo) {
Expand All @@ -4022,7 +4027,9 @@ void *TClass::New(void *arena, ENewType defConstructor) const

// ???BUG???
// Allow TObject's to be registered again.
SetObjectStat(statsave);
if(statsave) {
SetObjectStat(statsave);
}

// Register the object for special handling in the destructor.
if (p) {
Expand Down Expand Up @@ -4092,7 +4099,9 @@ void *TClass::NewArray(Long_t nElements, ENewType defConstructor) const
// Do not register any TObject's that we create
// as a result of creating this object.
Bool_t statsave = GetObjectStat();
SetObjectStat(kFALSE);
if(statsave) {
SetObjectStat(kFALSE);
}

TVirtualStreamerInfo* sinfo = GetStreamerInfo();
if (!sinfo) {
Expand All @@ -4106,7 +4115,9 @@ void *TClass::NewArray(Long_t nElements, ENewType defConstructor) const

// ???BUG???
// Allow TObject's to be registered again.
SetObjectStat(statsave);
if(statsave) {
SetObjectStat(statsave);
}

// Register the object for special handling in the destructor.
if (p) {
Expand Down Expand Up @@ -4175,7 +4186,9 @@ void *TClass::NewArray(Long_t nElements, void *arena, ENewType defConstructor) c
// Do not register any TObject's that we create
// as a result of creating this object.
Bool_t statsave = GetObjectStat();
SetObjectStat(kFALSE);
if(statsave) {
SetObjectStat(kFALSE);
}

TVirtualStreamerInfo* sinfo = GetStreamerInfo();
if (!sinfo) {
Expand All @@ -4189,7 +4202,9 @@ void *TClass::NewArray(Long_t nElements, void *arena, ENewType defConstructor) c

// ???BUG???
// Allow TObject's to be registered again.
SetObjectStat(statsave);
if(statsave) {
SetObjectStat(statsave);
}

if (fStreamerType & kEmulated) {
// We always register emulated objects, we need to always
Expand Down