Core/Scripts: Fix invalid memory write

Fix invalid memory write caused by calling "delete this;" in a base class constructor.