We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
When i create a new caffe::Net object in a Thread the memory is not freed.
Below example without Thread works fine and frees memory:
int main() { for(int i=0;i<10;i++) { caffe::Net* cnn = new caffe::Net(("deploy.prototxt")); delete cnn; } std::cin.ignore(); return 0; }
The below example using Threads doesn't free memory
void threadWork() { caffe::Net* cnn = new caffe::Net(("deploy.prototxt")); delete cnn; } int main() { for(int i=0;i<10;i++) { std::thread t1(threadWork); t1.join(); } std::cin.ignore(); return 0; }
Do you know what is causing this?
The text was updated successfully, but these errors were encountered:
memory pool manager is used for every thread, and these instances only freed when the program exit. check the code here and here
Sorry, something went wrong.
为什么在我的程序里面delete cnn就出错?
No branches or pull requests
Hi,
When i create a new caffe::Net object in a Thread the memory is not freed.
Below example without Thread works fine and frees memory:
The below example using Threads doesn't free memory
Do you know what is causing this?
The text was updated successfully, but these errors were encountered: