The ‘Dispose’ activity will destroy and delete any objects created during the workflow. The example below uses an object detection activity, that detects any objects in a video, then saves the detected frames to the local drive.
The ‘Dispose’ activity is used in advanced workflows where long-lived objects are created for comparisons or other operations and must be destroyed to avoid any potential memory leaks.
- Object To Dispose The expression containing the object to be disposed.
- Objects To Dispose The expression containing the collection of objects to be disposed.
See General Properties.
See Designer Properties above.
See Out Error.
Sample vide for object detection.
In this sample we load a video and apply object detection on it to find the frames with objects. The frames found are saved on the disc.
To avoid overloading the CPU, the object detection activity is configured in properties to check the frames every 2 seconds, but it can be changed to any value.