17 Apr
2007
17 Apr
'07
5:41 p.m.
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.