Is DirectX7 counting COM objects wrong?
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
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
Popular Topics
Advertisement