MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / release

Method release

src/ml/dyn_lib_classifier.cpp:53–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53int DynLibClassifier::release ()
54{
55 if (dll_loader == NULL)
56 {
57 return (int)BrainFlowExitCodes::CLASSIFIER_IS_NOT_PREPARED_ERROR;
58 }
59
60 int res = (int)BrainFlowExitCodes::STATUS_OK;
61 int (*func) (struct BrainFlowModelParams *) =
62 (int (*) (struct BrainFlowModelParams *))dll_loader->get_address ("release");
63 if (func == NULL)
64 {
65 safe_logger (spdlog::level::err, "failed to get function address for release");
66 res = (int)BrainFlowExitCodes::GENERAL_ERROR;
67 }
68 else
69 {
70 res = func (&params);
71 }
72
73 dll_loader->free_library ();
74 delete dll_loader;
75 dll_loader = NULL;
76
77 return res;
78}

Callers

nothing calls this directly

Calls 2

free_libraryMethod · 0.80
get_addressMethod · 0.45

Tested by

no test coverage detected