CaptureVisionRouter Instantiate
Name | Description |
---|---|
static createInstance() |
Initializes a new instance of the CaptureVisionRouter class. |
dispose() | Releases all resources used by the CaptureVisionRouter instance. |
disposed | Returns whether the CaptureVisionRouter instance has been disposed of. |
createInstance
Initializes a new instance of the CaptureVisionRouter
class.
Syntax
createInstance(): Promise<CaptureVisionRouter>;
Parameter
None.
Return value
A promise that resolves with the initialized CaptureVisionRouter
instance.
Code snippet
let router = await Dynamsoft.CVR.CaptureVisionRouter.createInstance();
dispose
Releases all resources used by the CaptureVisionRouter
instance.
Syntax
dispose(): Promise<void>;
Parameter
None.
Return value
A promise that resolves when the resources have been successfully released.
Code snippet
let router = await Dynamsoft.CVR.CaptureVisionRouter.createInstance();
// Use the router to perform a job.
// ...
// Release the resources after the job is finished.
router.dispose();
disposed
Returns whether the CaptureVisionRouter
instance has been disposed of.
Syntax
disposed: boolean;
Parameter
None.
Return value
Boolean indicating whether the CaptureVisionRouter
instance has been disposed of.
Code snippet
if(router.disposed){
console.log("The router has been disposed of.");
} else {
// Use the router to perform a job.
}