ptr_for_handle(handle(my_text)) is pointless. It will crash if my_text is a vagabonding pointer.

The clean way is to set all pointers to a specific element to null. Then you can check in the other code if its valid (non-null) or removed (null).


Always learn from history, to be sure you make the same mistakes again...