
Hi I used boost::intrusive_ptr in a function, say foo(), like this: boost::intrusive_ptr<BranchFeedback> theFeedback ( new BranchFeedback() ); std::vector< std::vector< BPredState > > theFetchState; .... theFeedback->theBPState = &theFetchState[anIndex][!anOne]; The difinition of BranchFeedback and BPredState are: struct BranchFeedback : boost::counted_base { ... boost::intrusive_ptr<BPredState> theBPState; }; struct BPredState : boost::counted_base { ... uint32_t theGShare; uint32_t theSerial; }; The problem is when foo() reaches the end (I mean '}'), I get segmentation fault which points to ~intrusive_ptr() { if(p_ != 0) intrusive_ptr_release(p_); } I thought I used the intrusive_ptr in a correct way. Is there any consideration that I missed? Thanks, // Naderan *Mahmood;