CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Class instance

  1. #1
    Join Date
    Aug 2001
    Location
    India
    Posts
    14

    Class instance

    How to determine the number of instances of a class at any given point of time?


  2. #2
    Join Date
    Sep 2001
    Location
    Bristol, England
    Posts
    321

    Re: Class instance

    Add a static member variable which you increment in the constructor and decrement in the desctructor


  3. #3
    Join Date
    Mar 2000
    Location
    Bangalore,India
    Posts
    776

    Re: Class instance

    Hi
    Take the concept of COM reference counting implementation and maintain a counter.

    Regards
    S.K.Pradhan


    Be sure to rate answers if it helped, to encourage them.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured