Scanbot SDK
Loading...
Searching...
No Matches
ScanbotSDKImageRefProfiler.h File Reference

Go to the source code of this file.

Typedefs

typedef struct scanbotsdk_image_ref_profiler_t scanbotsdk_image_ref_profiler_t
 scanbotsdk_image_ref_profiler_t class
 

Functions

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profiler_free (scanbotsdk_image_ref_profiler_t *self)
 Frees the memory allocated for the instance of scanbotsdk_image_ref_profiler_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profiler_make_snapshot (scanbotsdk_image_ref_pool_snapshot_t **result)
 Returns a snapshot of all alive ImageRefs. The snapshot contains a list of ImageRefs with information such as in-memory size. If detailed profiling is enabled (by calling enableDetailedProfiling beforehand), the profile will contain additional information such as the source from which each ImageRef has been created.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profiler_enable_detailed_profiling ()
 After the function is called, ImageRefs will store additional information, such as source from which they were created. This information may be important when trying to understand a profile. This function must be called BEFORE the first ImageRef is created, otherwise details may be lost.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_ref_profiler_diff (scanbotsdk_image_ref_pool_snapshot_t *first_snapshot, scanbotsdk_image_ref_pool_snapshot_t *second_snapshot, scanbotsdk_image_ref_pool_snapshots_diff_t **result)
 Computes difference between two snapshots. To confirm that a particular operation doesn't leak, take a snapshot before and after the operation, and check that the diff doesn't contain any unexpected new ImageRefs.