- Fixes:
leaked_storage: Variable handle going out of scope leaks the storage it points to.
- Apply:
Use std::move(factory_func) instead of factory_func.
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: skykongkong8 <ss.kong@samsung.com>
return layer;
};
- return registerFactory<nntrainer::Layer>(factory_func, type);
+ return registerFactory<nntrainer::Layer>(std::move(factory_func), type);
}
int AppContext::registerOptimizer(const std::string &library_path,
return optimizer;
};
- return registerFactory<nntrainer::Optimizer>(factory_func, type);
+ return registerFactory<nntrainer::Optimizer>(std::move(factory_func), type);
}
std::vector<int>