Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-04-17 13:41:37


Paul Giaccone wrote:

> 1. The creator function, required by Maya. Note the absence of a smart
> pointer. I tried wrapping this in a shared_ptr and returning .get()
> but this caused a crash, if I remember rightly.
>
> void* MyNode::creator(void)
> {
> return new MyNode();
> }

This is, I think, exactly as it should be. Maya expects to take ownership of
the returned pointer and will delete it when it decides that it's no longer
needed. But I'm not an expert on that; you probably need to ask in a Maya
SDK forum to be sure.


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