RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDataContext.AllocData Method

Returns a pointer to the data context's cache of raw memory.

Pascal
function AllocData(Size: Integer): Pointer;
C++
__fastcall void * AllocData(int Size);

Use AllocData to obtain a pointer to a chunk of temporary memory. 

Size is the number of bytes desired. 

AllocData returns a pointer to Size bytes.

Note: TDataContext does not actually allocate the memory that AllocData returns. Descendant classes must initialize the internal cache that the returned pointer addresses.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!