Jump to content
  • Advertisement

Archived

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

micro0815

Is DirectX7 counting COM objects wrong?

This topic is 6629 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
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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!