Skip to content

Commit

Permalink
Remove Gd::new_alloc() for now
Browse files Browse the repository at this point in the history
There is almost no use case for this, since this is covered by `UserT::alloc_gd()` and `Engine::new_alloc()`
in a shorter form. If we need generic programming, we should design it as a whole.
  • Loading branch information
Bromeon committed Nov 19, 2023
1 parent 025a98b commit 8281437
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions godot-core/src/obj/gd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,6 @@ where
unsafe { Gd::from_obj_sys(object_ptr) }
}

/// Construct default instance for manually managed pointer.
pub fn new_alloc<ManualMem>() -> Self
where
T: GodotClass<Mem = ManualMem> + cap::GodotDefault,
ManualMem: mem::PossiblyManual,
{
Self::default_instance()
}

/// Moves a user-created object into this smart pointer, submitting ownership to the Godot engine.
///
/// This is only useful for types `T` which do not store their base objects (if they have a base,
Expand Down

0 comments on commit 8281437

Please sign in to comment.