How to replace Blit with RTHandles in custom ScriptableRenderPass

I have seen this code that is using to create custom ScriptableRenderPass

private class CCTVLinePass : ScriptableRenderPass
{
    private RenderTargetIdentifier src, dest;
    private int destId = Shader.PropertyToID("_temp");

    public CCTVLinePass()
    {
        renderPassEvent = RenderPassEvent.BeforeRenderingPostProcessing;
    }

    public override void OnCameraSetup(CommandBuffer cmd, ref RenderingData renderingData)
    {
        src = renderingData.cameraData.renderer.cameraColorTargetHandle;
        cmd.GetTemporaryRT(destId, renderingData.cameraData.cameraTargetDescriptor, FilterMode.Bilinear);
        dest = new RenderTargetIdentifier(destId);
    }

    public override void OnCameraCleanup(CommandBuffer cmd)
    {
        cmd.ReleaseTemporaryRT(destId);
    }

    #region ScriptableRenderPass
    public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData)
    {
        var volumes = VolumeManager.instance.stack;
        var cctvPost = volumes.GetComponent<CCTVLinePost>();

        if (!cctvPost.IsActive())
            return;

        if (cctvPost.cctvMaterial == null)
        {
            Debug.LogWarning("You need to set the material");

            return;
        }

        
        var cb = CommandBufferPool.Get("CCTVRenderFeature");
        Blit(cb, src, dest, cctvPost.cctvMaterial.value, 0);
        Blit(cb, dest, src);
        context.ExecuteCommandBuffer(cb);
        CommandBufferPool.Release(cb);
    }
    #endregion
}

I get a warning that Blit is been obsolete and needs to be replaced with RTHandles.

Would appreciate of any help.

RTHandles are not too hard of a drop-in replacement. Change your RenderTargetIdentifiers into RTHandles, and instead of using GetTemporaryRT, use RenderingUtils.ReAllocateIfNeeded(), which handles allocation and resizing for you. You would have to dispose of the RTHandles when your feature goes out of scope, which is a bit annoying since you have to implement the Dispose() override in the RenderFeature to clean up the pass. This forum post has an example of how to allocate/dispose of an RTHandle in one of the code samples further down.