Results 1 to 2 of 2

Thread: Bigup COM Question

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    I don't know much about Doing COM in C++ but I think there is a way of knowing when a reference to your class is created and relesed, eg if you do this

    Code:
    Dim x as New myClass
    Dim y as MyClass
    
    Set y = x
    Set x = Nothing
    you would be told that a reference to your class was created when the line Set y = x Runs and told that one has bee relesed when set x = nothing runs

    it there a way of knowing this in VB?

  2. #2
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Rotterdam, Netherlands
    Posts
    386
    Ok I see what you mean. the terminate is only called when the last reference is released.
    Uhmm I can't think of a way to figure out...
    What you can do is create a function which returns a copy of the current class, if you use that to get more references (instead of the Set y = x) it might work. But AFAIK there's no way to get a refcount.
    Hope this helps

    Crazy D

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