gradient_for_type
BGradient* gradient = gradient_for_type(gradientType);
ObjectDeleter<BGradient> gradient(gradient_for_type(gradientType));