rt.lifetime

This module contains all functions related to an object's lifetime: allocation, resizing, deallocation, and finalization.

Members

Functions

_adDupT
void[] _adDupT(TypeInfo ti, void[] a)
_d_allocclass
Object _d_allocclass(ClassInfo ci)
_d_allocmemoryT
void* _d_allocmemoryT(TypeInfo ti)

for allocating a single POD value

_d_arrayappendcT
byte[] _d_arrayappendcT(TypeInfo ti, void* array, void* element)

Appends a single element to an array.

_d_arrayappendcd
char[] _d_arrayappendcd(char[] x, dchar c)

Append dchar to char[]

_d_arrayappendwd
wchar[] _d_arrayappendwd(wchar[] x, dchar c)

Append dchar to wchar[]

_d_arraycatT
byte[] _d_arraycatT(TypeInfo ti, byte[] x, byte[] y)
_d_arraycatnT
byte[] _d_arraycatnT(TypeInfo ti, uint n, ...)
_d_arraysetlengthT
byte* _d_arraysetlengthT(TypeInfo ti, size_t newlength, size_t plength, byte* pdata)

Resize dynamic arrays with 0 initializers.

_d_arraysetlengthiT
byte* _d_arraysetlengthiT(TypeInfo ti, size_t newlength, size_t plength, byte* pdata)

Resize arrays for non-zero initializers. p pointer to array lvalue to be updated newlength new .length property of array sizeelem size of each element of array initsize size of initializer ... initializer

_d_callfinalizer
void _d_callfinalizer(void* p)
_d_callinterfacefinalizer
void _d_callinterfacefinalizer(void* p)
_d_delarray
void _d_delarray(size_t plength, void* pdata)
_d_delclass
void _d_delclass(Object p)
_d_delinterface
void _d_delinterface(void* p)
_d_delmemory
void _d_delmemory(void* p)
_d_newarrayT
void* _d_newarrayT(TypeInfo ti, size_t length)

Allocate a new array of length elements. ti is the type of the resulting array, or pointer to element. The resulting array is initialized to 0

_d_newarrayiT
void* _d_newarrayiT(TypeInfo ti, size_t length)

As _d_newarrayT, but for when the array has a non-zero initializer.

_d_newarraymT
void* _d_newarraymT(TypeInfo ti, int ndims, size_t* dims)

Allocate a new array of arrays of arrays of arrays ... ti is the type of the resulting array. ndims is the number of nested arrays. dims it the array of dimensions, its size is ndims. The resulting array is initialized to 0

_d_newarraymiT
void* _d_newarraymiT(TypeInfo ti, int ndims, size_t* dims)

As _d_newarraymT, but for when the array has a non-zero initializer.

_d_newarraymvT
void* _d_newarraymvT(TypeInfo ti, int ndims, size_t* dims)

As _d_newarraymT, but without initialization

_d_newarrayvT
void* _d_newarrayvT(TypeInfo ti, size_t length)

As _d_newarrayT, but without initialization

newCapacity
size_t newCapacity(size_t newlength, size_t size)
rt_finalize
void rt_finalize(void* p, bool det)
rt_setCollectHandler
void rt_setCollectHandler(CollectHandler h)

Meta

License

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, in both source and binary form, subject to the following restrictions:

o The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. o Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. o This notice may not be removed or altered from any source distribution.

Authors

Walter Bright, Sean Kelly, Tomas Lindquist Olsen