The challenge you're having is because you're trying to resolve objects right out of the DependencyResolver
rather than using the request lifetime scope.
When you use Web API, the "request lifetime scope" is managed by the inbound request message. When you resolve something right from the root DependencyResolver
it is getting resolved at the application/top level, not as part of the request. That's why you aren't seeing anything disposed - because the owning lifetime scope isn't getting disposed, because that owning lifetime scope is at the root level.
I have a long discussion about request lifetime scope as an answer to this question: Transitioning to AutofacWebApiDependencyResolver from MVC's DependencyResolver - Where is .Current?
While that other question talks about test scenarios, the answer to it still holds - if you need to manually resolve something (which I'd recommend against if possible - service location isn't that great), then you need to do so out of the request scope associated with the request message.
// In the controller...
var validatorType = typeof(ICommandValidator<>)
.MakeGenericType(message.GetType());
var handler = this.Request
.GetDependencyScope()
.GetService(validatorType);