5 Mar
2008
5 Mar
'08
9:33 p.m.
Hello, The following program seems to exhibit a memory leak. The program itself does nothing. Can someone explain please? I'm using boost 1.33.1 -Thanks. #include "boost/lambda/bind.hpp" #include "boost/shared_ptr.hpp" void do_nothing(boost::shared_ptr<int> intPtr) { } int main() { while(1) { char c[10]; boost::shared_ptr<int> intPtr(new int); std::for_each(c, c+10, boost::lambda::bind(do_nothing, intPtr)); } } ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ