@hushell @vigsterkr Should I go for implementation of `factors_scope` and `factors_data` in `init` as:
```
SGVector<int32_t>* factors_scope = new SGVector<int32_t> [num_factors]
SGVector<float64_t>* factors_data = new SGVector<float64_t> [num_factors]
```
and 
```
delete [] factors_scope
delete [] factors_data
```
in the destructor `~CUAIFile`
I don't think this would lead to any memory leak.