memory/ | |
License | Copyright © 2007-2011, FreeBASIC Extended Library Development Group |
ext | |
fbext_Allocator((T_)) | Macro template that generates the default allocator class for use with T_ objects. |
Functions | |
constructor | Constructs an allocator object. |
constructor | Constructs an allocator object from another. |
destructor | Destructs the allocator object. |
Allocate | Acquires memory for an array of n number of T_ objects. |
DeAllocate | Frees the memory of the array starting at the address p, which contains n number of T_ objects. |
Construct | Copy constructs an object at address p with value. |
Destroy | Destroys the object at address p by calling its destructor. |
Copyright © 2007-2011, FreeBASIC Extended Library Development Group
Distributed under the FreeBASIC Extended Library Group license. See accompanying file LICENSE.txt or copy at http://code.google.com
Macro template that generates the default allocator class for use with T_ objects.
T_ | the type of object that is allocated and constructed. |
This is the default allocator used in many portions of the FreeBASIC Extended Library. It uses New[] and Delete[] to allocate and deallocate memory for objects.
Functions | |
constructor | Constructs an allocator object. |
constructor | Constructs an allocator object from another. |
destructor | Destructs the allocator object. |
Allocate | Acquires memory for an array of n number of T_ objects. |
DeAllocate | Frees the memory of the array starting at the address p, which contains n number of T_ objects. |
Construct | Copy constructs an object at address p with value. |
Destroy | Destroys the object at address p by calling its destructor. |
Constructs an allocator object.
declare constructor ( )
Destructs the allocator object.
declare destructor ( )
Acquires memory for an array of n number of T_ objects.
declare function Allocate ( byval n as SizeType, byval hint as fbext_TypeName(T_) ptr = 0 ) as fbext_TypeName(T_) ptr
Frees the memory of the array starting at the address p, which contains n number of T_ objects.
declare sub DeAllocate ( byval p as fbext_TypeName(T_) ptr, byval n as SizeType )
Copy constructs an object at address p with value.
declare sub Construct ( byval p as fbext_TypeName(T_) ptr, byref value as const fbext_TypeName(T_) )
Destroys the object at address p by calling its destructor.
declare sub Destroy ( byval p as fbext_TypeName(T_) ptr )