delete [] idString;
nsCRT::free(idString);
xpc_NewIDObject(JSContext *cx, const nsID& aID){    JSObject *obj = nsnull;    char* idString = aID.ToString();    if(idString)    {        nsJSID* iid = nsJSID::NewID(idString);        delete [] idString;        if(iid)        {            nsXPConnect* xpc = nsXPConnect::GetXPConnect();            if(xpc)            {                nsIXPConnectWrappedNative* nsid_wrapper;                if(NS_SUCCEEDED(xpc->WrapNative(cx,                                        NS_STATIC_CAST(nsISupports*,iid),                                        NS_GET_IID(nsIJSID),                                        &nsid_wrapper)))                {                    nsid_wrapper->GetJSObject(&obj);                    NS_RELEASE(nsid_wrapper);                }                NS_RELEASE(xpc);            }            NS_RELEASE(iid);        }    }    return obj;}