Garbage Collection
Is there a more elaborate or complete way to ensure that all Active X objects have been closed once they are finished with?
My application at the moment uses ActiveX objects to print cleanroom labels. It is written in VB.NET and consists of an MDI (container) form and several child forms which perform the print jobs.
Users have the option of using one or more forms to produce different types of label. This means that each form has to manage its own bartender objects each time it is used. This works pretty well, but I have noticed that sometimes there is a spare Bartender process still running after a form has been closed or even after the application itself is closed. This can interfere with other print jobs.
Is there another way to ensure all bartender objetcs are closed which can be executed on form or application close?
I cannot migrate to using the SDK at the moment for external reasons.
Thanks
-
What exact Edition, version and build of BarTender is in use?
Did you try using Marschal.FinalReleaseComObjectMethod() as explained on the below link from Microsoft?
"https://msdn.microsoft.com/en-us/library/system.runtime.interopservices.marshal.finalreleasecomobject(v=vs.100).aspx"
0 -
Hi,
Details as below:
Edition: Automation
Version: 9.4 SR3
Build: 2781
No I haven't tried this method but I'll look into it.
0
Please sign in to leave a comment.
Comments
2 comments