How to implement singleton for dll's

Discussion in 'C++' started by Beginner, Aug 15, 2009.

  1. Beginner

    Beginner New Member

    Joined:
    Aug 15, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Hi All,
    Can anyone tell me how to implement singleton for Dll's?

    Cheers,
    Beginner
     
  2. NewsBot

    NewsBot New Member

    Joined:
    Dec 2, 2008
    Messages:
    1,267
    Likes Received:
    3
    Trophy Points:
    0
    What do you mean by singleton Dlls?

    Do you mean load only once for all the programs calling it ?
     
  3. Beginner

    Beginner New Member

    Joined:
    Aug 15, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Yes! you are right. sorry :mad: !!! i wasn't make it clear in my question.
    When the class is implemented as singleton pattern and it is used in all the dll's. In such case it will have multiple instance. one per dll. So how to avoid such multiple instances.

    Thanks in Advance,
    Begineer
     
  4. NewsBot

    NewsBot New Member

    Joined:
    Dec 2, 2008
    Messages:
    1,267
    Likes Received:
    3
    Trophy Points:
    0
    Still I could not get you.

    Do you mean to say same class in more than one Dll ?

    If thats the case then they are any way different class but same type of work.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice