Skip to content

Commit

Permalink
RawGd::move_return_ptr with PtrcallType::Virtual leaks reference
Browse files Browse the repository at this point in the history
  • Loading branch information
TitanNano committed Aug 9, 2024
1 parent 817250a commit 80cd771
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions godot-core/src/obj/raw_gd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,10 +522,10 @@ where
if T::DynMemory::pass_as_ref(call_type) {
interface_fn!(ref_set_object)(ptr as sys::GDExtensionRefPtr, self.obj_sys())
} else {
ptr::write(ptr as *mut _, self.obj)
ptr::write(ptr as *mut _, self.obj);
// We've passed ownership to caller.
std::mem::forget(self);
}
// We've passed ownership to caller.
std::mem::forget(self);
}
}

Expand Down

0 comments on commit 80cd771

Please sign in to comment.