On 06/03/2010 11:08 PM, Eli Friedman wrote: >> // Writing modified module to new file. >> >> std::ostream *os = new std::ofstream("newfile.bc"); >> >> WriteBitcodeToFile(&M, *os); > > Try putting "delete os" here? > > -Eli Why does it even have to be dynamically allocated? It looks to me like an object on the stack will do fine. Sean