Huh, don't know where the delete went.  Added one and will push soon.


On Wed, Aug 21, 2013 at 4:16 PM, maverickg <notifications@github.com> wrote:

> In src/stan/gm/command.hpp:
>
> > +            metric_index = 0;
> > +
> > +          } else if (metric->value() == "diag_e") {
> > +            metric_index = 1;
> > +
> > +          } else if (metric->value() == "dense_e") {
> > +            metric_index = 2;
> > +          }
> > +
> > +          int sampler_select = engine_index + 10 * metric_index + 100 * static_cast<int>(adapt_engaged);
> > +
> > +          switch (sampler_select) {
> > +
> > +            case 0: {
> > +              typedef stan::mcmc::unit_e_static_hmc<Model, rng_t> sampler;
> > +              sampler_ptr = new sampler(model, base_rng);
>
> Is it a concern that we have "new" here (and below) and not "delete" in
> the end? At least valgrind would report memory loss.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/stan-dev/stan/pull/172/files#r5898113>
> .
>