QuercusVL Programming Manual
From now on, if you start “TSSimu” or “RLSimu” or real units are configured, you will start
receiving events.
VL_System_Terminate();
Stops VL class library execution.
VLUnload();
Unloads VL library.
2.2.1. Memory management
Memory management at C library must be done using the methods AddRef ( ) and Release ( )
inside the classes Detector, TrafficLight, RealTimeInformation, Incidence, Summary, Image,
Video, Configuration, ConfigurationDetector, ConfigurationTrafficLight y SettingsEntry:
●
AddRef
C:
void
Class
_AddRef ( int h )
The function adds a reference to the object. Necessary when copying the object. When
the object is no more needed, the function
Class
_Release must be called (see Release
method). The parameter “h” is a handler of the class.
●
Release
C:
void
Class
_Release ( int h )
The function decreases a reference to the object and frees the allocated memory, if the
number of references reach 0. It should be called, when the object to which a reference
was added (see AddRef), is no longer needed; or when an object that was obtained
calling a function that returned a handler of it, is no longer needed (already explained
in these methods, internally, the system calls to method AddRef).
The parameter “h” is a handler of the class.
Example:
detector = VL_Unit_get_Detectors_Item(unit, 0);
// Getting the detector
printf( …, VL_Detector_get_Id(detector));
// Working with the detector
printf( …, VL_Detector_get_UnitId(detector));
// Working with the detector
VL_Detector_Release(detector);
// Releasing the detector
Quercus Technologies
22