Is there a possibility of (or fast workaround for) creating an object defined as derived a class without creating base class object in memory; instead the derived object should refer to the actually existing object of base class ("take-over" its memory residence)? This is needed for speed reasons - creating new a derived object, copying data from base class object to it, and then destroying base object takes too much time.
You might want to consider composition instead of inheritance in this case - it would be more natural.
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