Boost logo

Boost Users :

From: INsideR (insider83_at_[hidden])
Date: 2003-12-13 15:08:18


Hello,
I have wrote simple programm:
        using namespace boost;
        shared_ptr<int> a(new int(10));
        shared_ptr<int> b;
        b=a;
        a.reset(new int(20));
        std::cout<<"a=="<<*a<<" b=="<<*b;
        return 0;
        
Checking this programm with DevPartner BoundsChecker, i found memory
leak:
Type Quantity Total (bytes) Allocation Location Sequence
Leak exiting program 1 84 setlocale - [setlocal.c, line 547 (Boostt.exe)] 9
Memory Leak Exiting Program: Address 0x00E44F88 (84) allocated by _malloc_dbg.

<if ( (ptloci = _malloc_crt( sizeof(threadlocinfo) )) == NULL )>

Where is the problem? May be i write incorrect code?

Best Wishes,
 Yury mailto:insider83_at_[hidden]


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net