Once matrix is created it will be automatically managed by using reference counting mechanism. Generated on mon sep 14 2020 03 23 59 for opencv by. Also note the extra parentheses required to avoid compilation errors.