freeStructFields method

  1. @override
void freeStructFields(
  1. ClassifierOptions struct
)
override

Deallocates any memory on the struct that would be missed simply by calling calloc.free(struct), which the parent who called this method will do after this method completes.

Implementation

@override
void freeStructFields(bindings.ClassifierOptions struct) {
  if (struct.display_names_locale.address != 0) {
    calloc.free(struct.display_names_locale);
  }
  if (struct.category_allowlist.address != 0) {
    calloc.free(struct.category_allowlist);
  }
  if (struct.category_denylist.address != 0) {
    calloc.free(struct.category_denylist);
  }
}