Jump to content
  • Advertisement

Archived

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

aker_jus

Smart pointers

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

I was recently looking at CComPtr of atlbase.h and I was wondering if it would be a good choice to use Smart pointers instead of the ordinary way LPDIRECT3DDEVICE9 for instance. I will not have to call Release, is that right? Any other benefits I get from smart pointers? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Yes,do not need call release any more,because CComPtr call it on destruct.

More benefits on QIs.

We create world.

Share this post


Link to post
Share on other sites
QIs? Can you tell me some more on that?

Also, if I create the device first and then the texture for example, how do I make sure that the texture is released before the device? Or does it handle it automatically?

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!