cpp interface question

Hi,

I recently started in my free time with Arduino (coming from Java).
I ordered the Wio LTE Cat M1 / NB1. It was all working fine, until I wanted to add an interface.

It looks like that object that I’m passing by reference has changed in the derived object. And I can’t figure out what I’m doing wrong. Could someone please give some advice? Thanks.

Code:
IBase.h

class IBase {
   public:
       virtual size_t print(const String& content) = 0;
};

Derived.h

#include "IBase.h"

class Derived : public IBase {
   public:
       size_t print(const String& content) override {
            SerialUSB.print("content length: ");
            SerialUSB.println(content.length());  <-- prints 1036831949
            return content.length();
       };
};

firmware.ino

#include "Derived.h"

IBase* base;

void setup() {
   base = new Derived();

   String text = "abcdefg";
   SerialUSB.print("text length: ");
   SerialUSB.println(text.length());  <-- prints 7

   base->print(text);
}