Hi I need help optimizing this code:
Code:
void free_fields(char** array, int count)
{
SendMessage(statusBAR, SB_SETTEXT, 1,(LPARAM)"Freeing Memory");
int i ;
if (count>0)
{
for (i = 0; i<count; i++ ) {
if (array!=NULL) free( array[i] );
}
if (array!=NULL) free( array );
}
//MessageBox(NULL,"Free","Free",MB_OK | MB_ICONERROR);
}
It is working but with big data its slow ;
Compiler TDM-GCC-64 -> x86_64-w64-mingw32-gcc.exe
Same code with Pelles C its much faster but sometimes crash the application
Thank You.