1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

AllocTyped fix when leak check is disabled

This commit is contained in:
Brian Fiete 2024-11-06 12:38:20 -05:00
parent f2ee292969
commit 09c909567c

View file

@ -259,6 +259,18 @@ namespace System
} }
} }
} }
#else
public void* AllocTyped(Type type, int size, int align)
{
if ((DestructorHandling != .Ignore) && (type.HasDestructor))
{
if (DestructorHandling == .Fail)
Runtime.FatalError("Destructor not allowed");
return AllocWithDtor(size, align);
}
return Alloc(size, align);
}
#endif #endif
[SkipCall] [SkipCall]