Is DirectX7 counting COM objects wrong?

Started by
2 comments, last by micro0815 23 years, 10 months ago
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
Advertisement
There are two references to the object: The one in the flipping chain and yours.
Thanks for your answer... but how do I release it correctly. My program terminates with one reference.
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.

This topic is closed to new replies.

Advertisement