• Welcome to Theos PowerBasic Museum 2017.

Question About Nothing

Started by Frederick J. Harris, September 24, 2010, 07:42:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Frederick J. Harris

If one has a reference to a COM object such as pComObj, calling Release() on it will likely decrement its reference count by one ( 1 ).  Asumming the actual reference count on it is 5 and was just decremented to 4 as described above, what then does this do...

Set pComObj=Nothing

Does that then cause the reference count to decrement to zero followed shortly by automatic object unloading?  Or does it just cause a memory leak?

José Roca

It just calls the Release method.

Frederick J. Harris

Ahh!  That's an interesting bit of information.  Thanks!