• Advertisement

Archived

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

Is DirectX7 counting COM objects wrong?

This topic is 6452 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

Hi there! I´ve added a debug output to my DirectX7 (in debug install) application printing the Number of References of each COM object. The application is working in fullscreen mode and creates on primary surface with attached backbuffer(s). Now to the more interesting part: When I initalize the pointer to the back surface (using method ''GetAttachedSurface'') the reference count of this object is 2 right from the beginning! The primary and my DDraw obj have a reference count of 1 which is correct (I assume :-) ). Did I overlook something in the Docs?? Any ideas on this? Frank

Share this post


Link to post
Share on other sites
Advertisement
There are two references to the object: The one in the flipping chain and yours.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Thanks for your answer... but how do I release it correctly. My program terminates with one reference.

Share this post


Link to post
Share on other sites
How do you discover the reference count of the object? COM rules state you should not trust the return value of Release(), as it is not required to be the correct value.

Share this post


Link to post
Share on other sites

  • Advertisement