Then you did something wrong in your code. Here is a working example for you:
Code:
#include <acknex.h>

TEXT* myText = NULL;

void waitForMyTextToBecomeNull()
{
	while (myText)
		wait(1);
		
	sys_exit("e voila...");
}


void main()
{
	myText = txt_create(1,1);
	waitForMyTextToBecomeNull();

	wait(-2);

	ptr_remove(myText);
	myText = NULL;
}



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