Nor this class nor mat has any virtual methods. Opencv has been around since 2001. Once the array is created it is automatically managed via a reference counting mechanism.