to avoid dynamically allocated memory management you can pass argumants by reference. Use boost::ref

std::ofstream fileIn = new std::ofstream( in_path, std::ios::binary);
std::ofstream *fileOut = new std::ofstream( out_path, std::ios::binary);
threads.create_thread(boost::bind(&searchActualData, boost::ref( fileIn ), boost::ref( fileOut ) ));