Location: Symbol Reference > Classes > TJwAutoPointer Class > TJwAutoPointer Methods > Wrap Method > TJwAutoPointer.Wrap Method (Pointer, Cardinal, TJwPointerType)
JWSCL Documentation
ContentsIndexHome
PreviousUpNext
TJwAutoPointer.Wrap Method (Pointer, Cardinal, TJwPointerType)
Pascal
class function Wrap(const Ptr: Pointer; Size: Cardinal; PointerType: TJwPointerType): IJwAutoPointer; overload;
Parameters 
Description 
const Ptr: Pointer 
Defines a pointer that is automatically destroyed.  
Size: Cardinal 
Defines the size of the pointer data. If size is not zero, the memory will be overwritten with zeroes before it is freed.  
PointerType: TJwPointerType 
Defines the pointer type. It is used to call the appropriate free function.  

Returns an auto pointer interface that is resposible for auto destruction.

Wrap wraps an existing pointer for auto desctruction. When the returned auto pointer interface goes out of scope the given pointer will be destroyed.

Copyright (c) 2010. All rights reserved.
This help was created by Doc-O-Matic sponsored by toolsfactory software inc.
What do you think about this topic? Send feedback!