mb_realloc |
![]() ![]() |
void* mb_realloc( void** pMemory, size_t size )
Reallocates a previously allocated memory block. Use this is you need to change the size of an allocated memory block.
Example
char* pFileName;
pFileName = mb_malloc_strcpy( "MyFile" );
if ( !HasExtension( pFileName ) ) { // Add file extension but first add 4 more characters to the filename string mb_realloc( strlen( pFileName ) + sizeof( ".BAS" ) );
// Add extension strcat( pFileName, ".BAS" ); } |