I am new to Maya plug-in development and am learning the object paradigm used within the system. I currently understand objects to be 'data containers', like classes minus any member functions; I am understanding also that suitable member functions (function sets, MFnX) can be attached to existing objects through setObject, or through their constructor. I also understand that many, if not all of the MFnXXX derivations of FnBase have a 'create' function - and here is my question. I see that MObject overloads the assignment operator to accept a reference. So if I type:
MFnDerivedFunctionSet mfdfs;
MObject myobj = mfdfs.create(kMyType);
...then 'myobj' is a reference to an object that Maya has created and stored somewhere. Where? An object has been created, I have a reference, a disguised pointer to it, but where is it? How might I delete that object for instance? Does MfnBase, or any of the other 'create' functions of the MFnX classes utilise a global pointer to where Maya stores the objects that the 'create' function creates.
Tim Craig
HyperMatter Dynamics
Real-time Soft & Rigid body Dynamics API