Skip to main content

Advanced Usage

Memory Management

The SDK, when used, allocates an important chunk of resources in order to process the signature into the provided images. Those resources can be freed up once you know that no interaction with SashaSDK is needed for some time.

sashaSDK.cleanup()

When you receive SashaSDK.Signing.Output the reference to the image can be an optimized memory representation of the image via CIImage. Any further transformation of the image bears your responsibility for memory management, but SashaSDK does not hold any in-memory representation of the source or processed images.

note

Calling cleanup() removes all data and processing performed during prepare(). After calling cleanup(), you'll need to run prepare() again before using the SDK.

Preemptive Warm Up

For better performance, prepare / warm up the SDK:

// Preemptively prepare SashaSDK
sashaSDK.prepare()
note

If you don't run prepare, it will be run for you when doing embedSignature() and lookupSignature().