Re: [C++-sig] memory leak with __iadd__

2013-09-27 Thread Nikolay Mladenov
if you .def ("test_iadd", &hist_t::operator+=, bp::return_self<>()) and you use it instead of += do you get the leak? On Thu, Sep 26, 2013 at 10:44 AM, Neal Becker wrote: > Nikolay Mladenov wrote: > > > On Wed, Sep 25, 2013 at 11:22 AM, Neal Becker > wrote: > > > >> I've been trying to track

Re: [C++-sig] memory leak with __iadd__

2013-09-26 Thread Neal Becker
Nikolay Mladenov wrote: > On Wed, Sep 25, 2013 at 11:22 AM, Neal Becker wrote: > >> I've been trying to track down a memory leak. When I use the following: >> >> .def ("__iadd__", &hist_t::operator+=, bp::return_self<>()) >> > > but this is no different then any other function def with return

Re: [C++-sig] memory leak with __iadd__

2013-09-26 Thread Nikolay Mladenov
On Wed, Sep 25, 2013 at 11:22 AM, Neal Becker wrote: > I've been trying to track down a memory leak. When I use the following: > > .def ("__iadd__", &hist_t::operator+=, bp::return_self<>()) > but this is no different then any other function def with return_self<> policy (which i do a lot)? wh

[C++-sig] memory leak with __iadd__

2013-09-25 Thread Neal Becker
I've been trying to track down a memory leak. When I use the following: .def ("__iadd__", &hist_t::operator+=, bp::return_self<>()) I have a leak. When changed to: .def (bp::self += hist_t::value_type()) there is no leak. Any ideas? I suppose I maybe should just start using the latter st