Optimized reference counting for structs of simple types.