In this tutorial we learn how the RVec class can be used to adopt existing memory or allocate some.
import ROOT
class UponCopyPrinter {
public:
UponCopyPrinter() = default;
UponCopyPrinter(UponCopyPrinter &&) = default;
UponCopyPrinter(const UponCopyPrinter &) { std::cout << "Invoking copy c'tor!" << std::endl; }
};
''')
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
<cppyy.gbl.UponCopyPrinter object at 0x563f7b7844a0> and <cppyy.gbl.UponCopyPrinter object at 0x563f7b7844a0>
<cppyy.gbl.UponCopyPrinter object at 0x563f7b7844a0> and <cppyy.gbl.UponCopyPrinter object at 0x563f76681e20>
- Date
- May 2018
- Author
- Danilo Piparo
Definition in file vo001_AdoptOrOwnMemory.py.