508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
|
* It will be free'd automatically when the object is deallocated.
*
* \param nItems The number of items to allocate
* \param size The size of each item to allocate
* \return A pointer to the allocated memory
*/
- (void*)allocMemoryForNItems: (size_t)nItems
withSize: (size_t)size;
/**
* \brief Resizes memory in the object's memory pool to the specified size.
*
* If the pointer is NULL, this is equivalent to allocating memory.
* If the size is 0, this is equivalent to freeing memory.
*
|
|
|
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
|
* It will be free'd automatically when the object is deallocated.
*
* \param nItems The number of items to allocate
* \param size The size of each item to allocate
* \return A pointer to the allocated memory
*/
- (void*)allocMemoryForNItems: (size_t)nItems
ofSize: (size_t)size;
/**
* \brief Resizes memory in the object's memory pool to the specified size.
*
* If the pointer is NULL, this is equivalent to allocating memory.
* If the size is 0, this is equivalent to freeing memory.
*
|
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
|
* \param pointer A pointer to the already allocated memory
* \param nItems The number of items to resize to
* \param size The size of each item to resize to
* \return A pointer to the resized memory chunk
*/
- (void*)resizeMemory: (void*)pointer
toNItems: (size_t)nItems
withSize: (size_t)size;
/**
* \brief Frees allocated memory and removes it from the object's memory pool.
*
* Does nothing if the pointer is NULL.
*
* \param pointer A pointer to the allocated memory
|
|
|
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
|
* \param pointer A pointer to the already allocated memory
* \param nItems The number of items to resize to
* \param size The size of each item to resize to
* \return A pointer to the resized memory chunk
*/
- (void*)resizeMemory: (void*)pointer
toNItems: (size_t)nItems
ofSize: (size_t)size;
/**
* \brief Frees allocated memory and removes it from the object's memory pool.
*
* Does nothing if the pointer is NULL.
*
* \param pointer A pointer to the allocated memory
|