numem.core.lifetime

Numem Internal Lifetime Handling.

This module implements the neccesary functionality to instantiate complex D types, including handling of copy constructors, destructors, moving, and copying.

Members

Functions

__blit
void __blit(T to, T from)

Blits instance from to location to.

__copy
void __copy(S source, T target)

Copies source to target.

__copy_postblit
void __copy_postblit(S source, T target)

Runs postblit operations for a copy operation.

__move
void __move(S source, T target)
T __move(T source)

Moves source to target, via destructive copy if neccesary.

__move_postblit
void __move_postblit(T newLocation, T oldLocation)

Ported from D runtime, this function is released under the boost license.

destruct
void destruct(T obj_)

Destroy element with a destructor.

emplace
void emplace(UT dst, Args args)

Runs constructor for the memory at dst

initializeAt
void initializeAt(T chunk)

Initializes the memory at the specified chunk.

initializeAtNoCtx
void initializeAtNoCtx(T chunk)

Initializes the memory at the specified chunk, but ensures no context pointers are wiped.

nu_autorelease
bool nu_autorelease(T item)

Adds the given item to the topmost auto release pool.

nu_autoreleasepool_pop
void nu_autoreleasepool_pop(void* ctx)

Pops an auto release pool from the pool stack.

nu_autoreleasepool_push
void* nu_autoreleasepool_push()

Pushes an auto release pool onto the pool stack.

Structs

nu_autoreleasewith
struct nu_autoreleasewith(alias handlerFunc)

UDA which allows specifying which functions numem should call when autoreleasing an object with nu_autorelease.

nu_destroywith
struct nu_destroywith(alias handlerFunc)

UDA which allows specifying which functions numem should call when destroying an object with destruct.

Templates

forward
template forward(args...)

Forwards function arguments while keeping out, ref, and lazy on the parameters.

Meta

Authors

Luna Nielsen