Thread: COM smart pointer / C++ smart pointer

  1. #1
    Registered User
    Join Date
    Jan 2007

    COM smart pointer / C++ smart pointer

    VisualC++ generates COM reference counting smart pointers for every COM interface and Im wondering to what C++ smart pointer best compares to these COM smart pointers

    for instance I have

    IInterface *



    Anyone knows?

  2. #2
    Join Date
    Oct 2007
    Inside my computer
    All smart pointers are generic. It doesn't matter WHAT you put into them, only HOW you use them. In other words, shared_ptr, unqiue_ptr and weak_ptr all work. It all depends on how you will use them, just as you would normal non-COM objects.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Pointers
    By MrMatt027 in forum C++ Programming
    Replies: 14
    Last Post: 12-10-2010, 04:32 PM
  2. Which smart pointer to use?
    By leeor_net in forum C++ Programming
    Replies: 4
    Last Post: 04-13-2009, 04:29 AM
  3. Why does C need pointer conversion
    By password636 in forum C Programming
    Replies: 2
    Last Post: 04-10-2009, 07:33 AM
  4. Smart pointer class
    By Elysia in forum C++ Programming
    Replies: 63
    Last Post: 11-03-2007, 07:05 AM
  5. Direct3D problem
    By cboard_member in forum Game Programming
    Replies: 10
    Last Post: 04-09-2006, 03:36 AM