Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 20 Jun 2013
Offline Last Active Feb 09 2014 08:03 AM

Topics I've Started

Passing an CComPtr<IDirect3DDevice9> to another class via its constructor

20 June 2013 - 08:50 AM

How do I safely pass a CComPtr<IDirect3DDevice9> to another class via its constructor? Do I pass by reference or by value? Which way does the CComPtr actually add to the reference counter? And do I store it as raw pointer or another CComPtr in the newly created class? 

I'm bit overwhelmed by the pointers, references and memory leaks I have to deal with coming from C# :-/


Thanks for your help in advance,