This repository was archived by the owner on Jul 3, 2025. It is now read-only.
This repository was archived by the owner on Jul 3, 2025. It is now read-only.
Open
Description
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?
Metadata
Metadata
Assignees
Labels
No labels