Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char** g_pInstanceLayersArray = NULL;
- char** g_pInstanceLayersArrayNew = NULL;
- unsigned int uiSize;
- ------
- //(1)
- uiSize = 1;
- g_pInstanceLayersArray = (char**) realloc(g_pInstanceLayersArray,sizeof(char*)*uiSize);
- ------
- //(2)
- uiSize = 1;
- g_pInstanceLayersArrayNew = (char**) realloc(g_pInstanceLayersArray,sizeof(char*)*uiSize);
- if(g_pInstanceLayersArrayNew) g_pInstanceLayersArray = g_pInstanceLayersArrayNew;
- else{
- //realloc fail
- if(g_pInstanceLayersArray) free(g_pInstanceLayersArray);
- }
- ------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement