nogc_trynew

Attempts to allocate a new instance of T using the DLang allocation strategy.

  1. Ref!T nogc_trynew(Args args)
    @nogc @trusted nothrow
    Ref!T
    nogc_trynew
    (
    T
    Args...
    )
    (
    auto ref Args args
    )
  2. Ref!T nogc_trynew(NuHeap heap, Args args)

Parameters

args Args

The arguments to pass to the type's constructor.

Return Value

Type: Ref!T

A reference to the instantiated object or null if allocation failed.

See Also

Meta