All of HALCON's classes, i.e., not only HImage, HRegion, HTuple, HFramegrabber etc., but also the class HObject used when calling operators in the procedural approach, release their allocated resources automatically in their destructor (see also section “Destructors and Halcon Operators”). Furthermore, when constructing instances anew, e.g., by calling CreateBarCodeModel via an already initialized instance as mentioned in section “Constructors and Halcon Operators”, the already allocated memory is automatically released before reusing the instance. Thus, there is no need to call the operator ClearObj in HALCON/C++; what is more, if you do use it HALCON will complain about already released memory. To explicitly release the resources before the instance gets out of scope, you can call the method Clear() of the instance.