Memory Management - quercus SmartLoop TS Programming Manual

Table of Contents

Advertisement

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:
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:
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);
printf( ..., VL_Detector_get_Id(detector));
printf( ..., VL_Detector_get_UnitId(detector));
VL_Detector_Release(detector);
Quercus Technologies
void Class_AddRef ( int h )
void Class_Release ( int h )
// Getting the detector
// Working with the detector
// Working with the detector
// Releasing the detector
22

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SmartLoop TS and is the answer not in the manual?

This manual is also suitable for:

Birdwatch red lightSmartloop ts plus

Table of Contents