Is this safe to use pthread?

I found a sample on cocos2d-x’s documents here: http://www.cocos2d-x.org/wiki/How_to_use_pthread

But is it safe to delete a pointer in the new thread?

It depends on how the pointer is used.
And on v3.0, you can use std::thread instead of pthread.