다음을 통해 공유


IAtlStringMgr::Allocate

Allocates a new string data structure.

CStringData* Allocate(
   int nAllocLength,
   int nCharSize 
) throw( );

Parameters

  • nAllocLength
    The number of characters in the new memory block.

  • nCharSize
    The size (in bytes) of the character type used by the string manager.

Return Value

Returns a pointer to the newly allocated memory block.

참고

Do not signal a failed allocation by throwing an exception. Instead, a failed allocation should be signaled by returning NULL.

Remarks

Call IAtlStringMgr::Free or IAtlStringMgr::ReAllocate to free the memory allocated by this method.

참고

For usage examples, see Memory Management and CStringT.

Requirements

Header: atlsimpstr.h

See Also

Reference

IAtlStringMgr Class

Other Resources

IAtlStringMgr Members