|
Boost Users : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-04-17 13:22:16
Paul Giaccone wrote:
> Does anyone know of any evidence that the memory management in
> smart_ptr might be incompatible with Maya, in particular, in gcc
> 3.2.3?
>
> My supervisor, who is unfamiliar with Boost's smart_ptr library, but
> is familiar with Maya, tells me that Maya has its own memory
> management, and that Boost's smart pointers might somehow interfere
> with this.
When you create a shared_ptr:
shared_ptr<X> px( new X );
and then destroy all of its copies, it behaves "as if" you've invoked
"delete" at the same context where you created px. So if you've overloaded
new and delete it will use them. I'm not sure how this applies to your
particular case. My passing experience with the Maya SDK is that its classes
are well behaved and manage their own memory, so there might be no need to
use smart pointers.
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