
Untitled
By: a guest on
Jun 26th, 2012 | syntax:
None | size: 0.47 KB | hits: 9 | expires: Never
Seg fault after calling destructor successfully or calling empy destructor. C
ParallelSynthesizer* p = new ParallelSynthesizer(argc, argv);
p->synthesize();
delete p;
cout << "after deleting" << endl;
pthread_t threads[num_threads];
// makes the "params" array here. skipped.
for (int i=0; i<num_threads; i++) {
pthread_create(&threads[i], NULL, synthesizeThreadMethod, (void*)(params[i]));
}
for (int i=0; i<num_threads; i++) {
pthread_join(threads[i], NULL);;
}