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.
Well, I found out that the destructor of CoreServices takes care of the remaining SceneGraph reference.
Thank you
Log in to post a comment.
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.
Well, I found out that the destructor of CoreServices takes care of the remaining SceneGraph reference.
Thank you