• Advertisement

Archived

This topic is now archived and is closed to further replies.

Reference count

This topic is 5340 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have found that, after this piece of code, the reference count for pChildXFileData is 3:
// pXFileData is a valid LPDIRECTXFILEDATA object

LPDIRECTXFILEDATA pChildXFileData = NULL;
LPDIRECTXFILEOBJECT pChildXFile = NULL;

pXFileData->GetNextObject(&pChildXFile);
pChildXFile->QueryInterface(IID_IDirectXFileData, (void**) &pChildXFileData);
 
Shouldn''t it be 1? Does anyone know why it''s 3? I''ll appreciate your help very much. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Where are you getting this reference count number from?

Share this post


Link to post
Share on other sites
quote:
Where are you getting this reference count number from?


I execute pChildXFileData->Release() after that piece of code and it returns 3.

Share this post


Link to post
Share on other sites
So, nobody can help me?

Doesn''t anyone know if there may exist a mistake somewhere else in the code that can affect the reference count?

Share this post


Link to post
Share on other sites

  • Advertisement