Opened 10 years ago

Closed 10 years ago

#7204 closed Bugs (duplicate)

boost1.50 unorder_map not affect shared_ptr object reference count on mac 10.8

Reported by: wen max <wen.max8@…> Owned by: Daniel James
Milestone: To Be Determined Component: unordered
Version: Boost 1.50.0 Severity: Showstopper
Keywords: Cc:

Description

here is the test code:

#include <iostream> using namespace std;

#include <boost/smart_ptr.hpp> #include <boost/unordered_map.hpp>

typedef unsigned long long ulonglong;

class test {

int a;

public:

test(int i) : a(i) {} ~test() {}

};

int main(int argc, const char * argv[]) {

boost::unordered_map<ulonglong, boost::shared_ptr<test> > tt; boost::shared_ptr<test> e(new test(3)); tt.insert(make_pair(1314, e)); return 0;

}

I'm developing program under mac 10.8 with Xcode 4.4 . When using unordered_map with upper codes, boost150 will not add reference count of var e, but boost 149 works fine.

When doing this test, I switch the include header folder of /usr/local/include/boost betweet boost150 and boost 149.

Change History (1)

comment:1 by Daniel James, 10 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #7100 (and #7205).

Note: See TracTickets for help on using tickets.