Skip to content

Commit

Permalink
Ensure most derived class instance is used for destruct
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaTheFoxgirl committed Nov 10, 2024
1 parent 1c48754 commit af9b0e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/numem/core/memory/alloc.d
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ void destruct(T)(ref T obj_) {

static if (isPointer!T || is(T == class)) {
if (obj_ !is null) {
auto cInfo = cast(ClassInfo)typeid(T);
auto cInfo = cast(ClassInfo)typeid(obj_);
if (cInfo) {
auto c = cInfo;

Expand Down

0 comments on commit af9b0e7

Please sign in to comment.