seacode / gmacs

A generic size-structured stock assessment model
https://seacode.github.io/gmacs
18 stars 14 forks source link

The classes for selectivity and nloglike need tidying up #137

Open quantifish opened 9 years ago

quantifish commented 9 years ago

Do they really need to be templates? I would suggest getting rid of this overhead and just define them as standard classes.

Also, the classes require that proper destructor’s be coded up as there are memory leaks that are blowing up the MCMC.

smartell commented 9 years ago

No they don't need to be templates. I was experimenting with using templates to avoid having to write duplicate code for data versus variable types. Never knew there was a memory leak. I don't recall allocating pointers in the classes, but this could be a sources as all the destructors are empty.