Game crash when i run this code under android

I wrote some code like this

class TestObject: public CCObject
{
    //some code
}

class Thread:public CCObject
{
public :
    ~Thread()
    {
        if(obj)
        {
            obj->release();
        }
    }
    void start(){/*some code to start the thread*/}
    void run()
    {
        doSomeJob();
                obj = new TestObject();
        m_exit = true;
    }
    bool m_exit;
    TestObject* obj;
}


//schedule func

void TestScene::update_test(ccTime t)
{
    if(!m_thread)
    {
        m_thread = new Thread();
        m_thread->start();
    }
    if(m_thread&&m_thread->m_exit)
    {
        m_thread->release();
        //director to other scene
    }
}

it crash when i build and run it under the android.

this code do some job like that:

I start a new thread use pthread and in this new thread I use it to login the game server and load the user data from the server, on the load scene schedule function i test if this job is done if done read this data and release the thread.
Can some one figure out the problem why the game crash. Thanks.

Many codes in engine use autorelease() to let autorelease pool manage the life cycle of the object.
Autorelease pool now is not thread-safe. So maybe you operate the object that allocated from engine
in the new thread is released. Then it may crashed.

I don’t know if it is the real reason, just a guess.