Unable to destroy COM object
Visual Basic
1
Posts
1
Posters
0
Views
1
Watching
-
I wrote a class in vb.net with the necessary modifications so it can be accessed as COM object from other apps such as VB6. VB6 can access my class and call all methods with no problems. However, when a VB6 user is debugging his/her code and stops his/her running program, the destructor of my COM class doesn't get called (Sub Finalize). My class already has a Dispose method that takes care of all necessary cleanup; however, this method can be called only when VB6 code is running and if user clicks Stop button my class destructor doesn't get called. Please advice because only way to do clean up right now is to completely close VB6 app and restart again.