User manual

Table Of Contents
Host Interface
55
In the application code:
1. Stop all engine timers.
2. Destroy the cFM2Notify callback object.
3. Destroy the cFM2ScanUSBForChange and
cFM2ScanForData objects.
4. Destroy the cFM2Listener object and the reference
to the IFM2Listener interface to it.
The following Visual Basic 6.0 code shows the steps:
‘Stop all engine timers
ScanUSBForChange.StopTimer
ScanForData.StopTimer
‘Destroy the cFM2Notify callback object
Set NotifyMe = Nothing
‘Destroy the cFM2ScanUSBForChange and cFM2ScanForData objects
Set ScanForData = Nothing
Set ScanUSBForChange = Nothing
‘Destroy the cFM2Listener object and
‘the reference to the IFM2Listener interface to it
Set FieldMax2Listener = Nothing
Set ThisListener = Nothing
Teardown is an important cleanup function. Failing to
properly cleanup can result in memory leaks, a hung
application, and other unexpected behavior.
Type Library
Details
The type information in this section was obtained using
OLEView. Additional explanations accompany each
entry. The type library entries that serve internal
processing purposes only are not explained.