ad::Expression<T>\* Differentiate(ad::Expression<T>\* exp, unsigned long id = 0) leaks. Need to use a different stack and take all new Expressions, release all but the return Expression.
ad::Expression* Differentiate(ad::Expression* exp, unsigned long id = 0) leaks.
Need to use a different stack and take all new Expressions, release all but the return Expression.