hihi,
when I open a file using ofstream or fopen, the memory cannot be released after I call close() function. how can I release the memory?
P.S. the memory can be released after remove the files.
the program code:
int main (int argc, char **argv){
ofstream file1;
while (true){
/**
* intToStr() uses to converts interger to string
*/
filename1 = "/mnt/data/"+intToStr(count)+".txt";
file1.open(filename1.c_str());
for (int i = 0; i < 3000; i++){
file1 << "testing string";
file1.flush();
}
file1.close();
count++;
}
}