Skip to content

Commit

Permalink
again
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Nov 11, 2023
1 parent cfdc273 commit 0c19d90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/common/objects/dobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,8 @@ template<typename T, typename... Args>
T* Create(Args&&... args)
{
DObject::nonew nono;
T *object = new(nono) T(std::forward<Args>(args)...);
auto memory = M_Calloc(sizeof(T), 1);
T *object = ::new(memory) T(std::forward<Args>(args)...);
if (object != nullptr)
{
object->SetClass(RUNTIME_CLASS(T));
Expand Down

0 comments on commit 0c19d90

Please sign in to comment.