| 51 | } |
| 52 | |
| 53 | int 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 (¶ms); |
| 71 | } |
| 72 | |
| 73 | dll_loader->free_library (); |
| 74 | delete dll_loader; |
| 75 | dll_loader = NULL; |
| 76 | |
| 77 | return res; |
| 78 | } |
nothing calls this directly
no test coverage detected