Menu

Quesion on HelloWorld Sample

KN!GHT
2007-08-25
2013-05-28
  • KN!GHT

    KN!GHT - 2007-08-25

    I have a simple question regarding HelloWorld example, would appreciate your comment.

    just before the program ends, refCount for pSceneGraph is 2, this is because:

    * refcount is set to 1 on this:
    result = pCoreServices->Initialize(IFXPROFILE_BASE);

    * refcount is increased on:
    result = pCoreServices->GetSceneGraph(IID_IFXSceneGraph, (void**)&pSceneGraph);

    but pSceneGraph is released only once at the end of the program:
    IFXRELEASE(pSceneGraph)

    this means the objet that pSceneGraph points never gets deleted. Can you please comment?

    Thank you.

     
    • KN!GHT

      KN!GHT - 2007-08-25

      Well, I found out that the destructor of CoreServices takes care of the remaining SceneGraph reference.

      Thank you

       

Log in to post a comment.