Пример #1
0
void ibrowserAPI::clean()
{
    if (NULL != device)
    {
        idevice_free(device);
        device = NULL;
    }
    
    if (NULL != instproxy_client)
    {
        instproxy_client_free(instproxy_client);
        instproxy_client = NULL;
    }
    
    if (NULL != lockdownd_client)
    {
        lockdownd_client_free(lockdownd_client);
        lockdownd_client = NULL;
    }
    
    if (NULL != sbservices_client)
    {
        sbservices_client_free(sbservices_client);
        sbservices_client = NULL;
    }
    
    if (NULL != afc_client)
    {
        afc_client_free(afc_client);
        afc_client = NULL;
    }
    
}
Пример #2
0
Device::~Device() {
    if (this->mInstProxy != NULL) {
        instproxy_client_free(this->mInstProxy);
    }
    if (this->mLockDown != NULL) {
        lockdownd_goodbye(this->mLockDown);
    }
    if (this->mDevice != NULL) {
        idevice_free(this->mDevice);
    }
    if (this->mScreenShotr != NULL) {
        screenshotr_client_free(this->mScreenShotr);
    }
    if (this->mSb != NULL) {
        sbservices_client_free(this->mSb);
    }
    if (this->mNp != NULL) {
        np_client_free(this->mNp);
    }
    if (this->mFileRelay != NULL) {
        file_relay_client_free(this->mFileRelay);
    }
}