|
Boost Users : |
Subject: [Boost-users] share_ptr reset() question
From: Ben (befung_at_[hidden])
Date: 2009-03-18 20:28:19
Hello,
Consider the following:
void createSharePtr( boost::shared_ptr<int> value)
{
value.reset( new int(100));
}
main()
{
boost::shared_ptr<int> y( new int(0));
createSharePtr( y);
};
Question: Does the function createSharePtr() cause memory leak?
Thanks,
Ben
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