Threads: segmentation fault

Hey guys
I am having issues with threads. I am trying to make a thread for my downloader function but for some reason it is giving segmentation fault. Below are the lines of code that are giving me this issue. Can idea why this is happening???

Code
string* Pages = new string[BufferSize]; //BufferSize is 10
thread* Downloaderthreads = new thread[DownloaderThreadsNumber]; //DownloaderthreadsNumber = 1

Downloaderthreads[0] = thread(downloader,Pages,BufferSize,0);
Downloaderthreads[0].join();
delete[] Downloaderthreads;
delete[] Pages;
//downloader(Pages,BufferSize,0); This function call works for me!!!!
Last edited on
Topic archived. No new replies allowed.