Skip to content

Commit

Permalink
[pyroot] Fix mismatch between Allocate/Deallocate in clingwrapper
Browse files Browse the repository at this point in the history
Backport of:

wlav/cppyy-backend@d15e0a0

Co-authored-by: Wim Lavrijsen <[email protected]>
  • Loading branch information
vepadulano and wlav committed Jul 15, 2024
1 parent 34ea417 commit 6d2f2a0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ bool Cppyy::IsComplete(const std::string& type_name)
Cppyy::TCppObject_t Cppyy::Allocate(TCppType_t type)
{
TClassRef& cr = type_from_handle(type);
return (TCppObject_t)malloc(gInterpreter->ClassInfo_Size(cr->GetClassInfo()));
return (TCppObject_t)::operator new(gInterpreter->ClassInfo_Size(cr->GetClassInfo()));
}

void Cppyy::Deallocate(TCppType_t /* type */, TCppObject_t instance)
Expand Down

0 comments on commit 6d2f2a0

Please sign in to comment.