If I create/allocate C++ objects in objective C such that Objective C objects are using pointers of the C++ objects and the code is intermingled will ARC manage C++ objects too and release/free them ?? What happens to C++ object whose pointer is in a Objetive C object which is not accessible ? and proposed candidate for removal from memory ??
According to Cocoa Core Competencies: Object life cycle, you should free resources in the dealloc method. For a "raw" C++ pointer, this means writing a delete expression.
ARC's part is to insert retain and release calls such that dealloc happens once an object is no longer accessible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With