Freeing memory error?
问题 I need to free the bitpointer , because this function is executed multiple times and memory usage is growing for a reason I don't understand and it crashes after reaching 22mb of ram usage.. If I try to delete the bitpointer like this delete []bitpointer or free(bitpointer) I get access violation error. But I don't understand why, because the function shouldn't use the pointer any more and the new red blue green values are set.. void Get_Color(int x,int y,int w,int h,int &red,int &green,int