Boost logo

Boost Users :

Subject: Re: [Boost-users] question about boost pointer
From: young (yqin_99_at_[hidden])
Date: 2012-06-09 10:34:19


example:

class MyClass
{
    boost::shared_ptr<boost::shared_array&lt;char>> pBuff;

    void getnextpacket(size)
    {
        pBuff = boost::shared_ptr<boost::shared_array&lt;char>> (new
boost::shared_array<char>(new char[size]));
        ...
    }

    void other_func()
    {
        // use pBuff here
        ...
    }
}

--
View this message in context: http://boost.2283326.n4.nabble.com/question-about-boost-pointer-tp4631069p4631102.html
Sent from the Boost - Users mailing list archive at Nabble.com.

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