|
Hi Guy!
Comment ca va? I'm not sure I understand your question... To me a CRef is a temporary pointer to an XSI object. If XSI or you delete the object, the the CRef should become invalid... Imagine this code:
CRef oObj(!something valid!); // oObj.IsValid() should return true CValueArray oArgs(1); oArgs[0] = CValue(oObj); CValue oRtn; Application().ExecuteCommand("DeleteObj", oArgs, oRtn); //now
oObj.IsValid() should return false.
I might be really wrong here... And of course this doesn't work in the scope of an operator!
Cheers,
Aloys
On 16/12/05,
Guy Rabiller <guy(at)alamaison.fr> wrote:
Hi,
while talking offline with Alan on some issue, I suddently had a doubt regarding the persistence of CRef objects's references.
Thinking this is exactly one of the purposes of the CRef class, I still
would like to be 100% sure that it is guaranted that an object referenced by a CRef object will persist at least as long as the CRef object itself lifespan ?
Or is there any situation where a CRef object might become invalid
because the referenced object has been deleted ( by XSI, not the user ) ? ( are they 'reference counted' ? )
By object referenced by a CRef instance I dont only mean 'something' in the 3d scene, but any instance of any derived class from CRef.
Andrew ? -- guy rabiller | 3d technical director (at) LaMaison
--- Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body: unsubscribe xsi
-- Aloys Baillet - XSI Technical Director Character Dpt - Animal Logic --
|