Commit 9ad482cd authored by 刘劭荣(20软)'s avatar 刘劭荣(20软)

内存回收

parent 175478db
...@@ -65,7 +65,7 @@ drr::drr(std::string input) ...@@ -65,7 +65,7 @@ drr::drr(std::string input)
loadDICOMInGPUMemory(cpp_object3D, SizeCT, PixelSpacingCT); loadDICOMInGPUMemory(cpp_object3D, SizeCT, PixelSpacingCT);
free(cpp_object3D); free(cpp_object3D);
cpp_object3D = NULL; cpp_object3D = NULL;
std::cout << "itk readfile :" << (double)clock() / CLOCKS_PER_SEC - time << std::endl; std::cout << "readfile time:" << (double)clock() / CLOCKS_PER_SEC - time << "s" << std::endl;
} }
......
...@@ -18,6 +18,7 @@ void socketManager::get_CUDAdrr(const char * path) ...@@ -18,6 +18,7 @@ void socketManager::get_CUDAdrr(const char * path)
{ {
if (rd != NULL) { if (rd != NULL) {
// 析构 释放GPU内存 // 析构 释放GPU内存
//free(rd);
rd = NULL; rd = NULL;
} }
rd = new drr(path); rd = new drr(path);
...@@ -80,7 +81,7 @@ void socketManager::open_socket() { ...@@ -80,7 +81,7 @@ void socketManager::open_socket() {
const char* msg = "ct imported successfully"; const char* msg = "ct imported successfully";
send(sClient, msg, strlen(msg), 0); send(sClient, msg, strlen(msg), 0);
/////// ///////
printf("CT imported successfully :'%s'\n", ret - 3, CTpath); printf("CT imported successfully :'%s'\n", CTpath);
} }
else if (szMessage[0] == 'P' && szMessage[1] == 'A' && else if (szMessage[0] == 'P' && szMessage[1] == 'A' &&
szMessage[2] == 'R' && szMessage[3] == 'A' && szMessage[2] == 'R' && szMessage[3] == 'A' &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment