Sign in to follow this  
Tibetan Sand Fox

Beginner Question: Why do we use ZeroMemory macro for Swap Chain object ?

Recommended Posts

Hello.
As I mentioned in topic I'm curious why does Swap Chain object require to use ZeroMemory macro before filling it with data? I know what ZeroMemory macro does - from what I read on MSDN it fills a block of memory with zeros, but why?

Thanks a lot in advance for satisfying my curiosity.

Share this post


Link to post
Share on other sites
Thank you. I used debugger today as well to see myself how the process of Swap Chain initialization exactly works. I managed to notice that after creating Swap Chain struct object is filled with some random data (structs don't have constructor as you mentioned) and as you said I see I could skip the ZeroMemory step, but it's very convenient and I don't have to care about all of the struct members. I guess I'll stay that way. Thanks again. Edited by Agbahlok

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this