iOS Charting Documentation - SciChart iOS Charts SDK v3.x

SCIDisposableBase

@interface SCIDisposableBase : NSObject <ISCIDisposable>

Defines base class for the disposable object.

  • Helper method which checks if disposable is null before disposing.

    Declaration

    Objective-C

    + (void)tryDispose:(nonnull id<ISCIDisposable>)disposable;

    Swift

    class func tryDispose(_ disposable: ISCIDisposable)

    Parameters

    disposable

    The disposable instance.

  • Helper method which disposes an array of disposables.

    Declaration

    Objective-C

    + (void)tryDisposeArray:(nonnull NSArray<id<ISCIDisposable>> *)array;

    Swift

    class func tryDisposeArray(_ array: [ISCIDisposable])

    Parameters

    array

    The disposable array.

  • Helper method which disposes the dictionary of disposables.

    Declaration

    Objective-C

    + (void)tryDisposeDictionary:
        (nonnull NSDictionary<id, id<ISCIDisposable>> *)dictionary;

    Swift

    class func tryDisposeDictionary(_ dictionary: [AnyHashable : ISCIDisposable])

    Parameters

    dictionary

    The disposable dictionary.