Skip to content

Commit

Permalink
Merge pull request #3378 from wmtan/FixMemoryHoardingBug
Browse files Browse the repository at this point in the history
Fix memory hoarding bug
  • Loading branch information
davidlt committed Apr 17, 2014
2 parents aefd522 + db2b86e commit a306c52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions FWCore/Utilities/interface/TypeWithDict.h
Expand Up @@ -119,6 +119,9 @@ class TypeWithDict {
void deallocate(void* address) const;
ObjectWithDict construct() const;
void destruct(void* address, bool dealloc = true) const;
void* ttype() const {
return type_;
}
};

// A related free function
Expand Down
4 changes: 2 additions & 2 deletions FWCore/Utilities/src/ObjectWithDict.cc
Expand Up @@ -18,12 +18,12 @@ namespace edm {
}

ObjectWithDict::ObjectWithDict(TypeWithDict const& type, void* address) :
type_(gInterpreter->Type_Factory(type.typeInfo())),
type_(static_cast<TType*>(type.ttype())),
address_(address) {
}

ObjectWithDict::ObjectWithDict(std::type_info const& ti, void* address) :
type_(gInterpreter->Type_Factory(ti)),
type_(static_cast<TType*>(TypeWithDict(ti).ttype())),
address_(address) {
}

Expand Down

0 comments on commit a306c52

Please sign in to comment.