`TextItem` is a subclass of `XObject`.

I am trying to figure out why the following works:

```
  TextItem *textItem = new TextItem();
  XObject *xItem = textItem;
  delete textItem;

```

But this does not:

```
  TextItem *textItem = new TextItem();
  XObject *xItem = textItem;
  delete xItem;

```

The second example fails on `delete`, with an assertion failure (`_BLOCK_TYPE_IS_VALID`).