Archived

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

Night Elf

Reference count

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
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