In this post i would like to discuss what happens when cv mat is passed around. Once the array is created it is automatically managed via a reference counting mechanism. Often times when we pass cv mat we forget one important thing.