ios - crash on [GetReturnValue:] method is used to obtain OC object, help me -


using [code 1]【 getreturnvalue :】 ios reflection oc object, in

【iphone4s + ios8.4】、【 iphone 4 + ios7.1】 (crash),
【iphone6 + ios9.3】、【 iphone 5 + ios8.4.1】 (pass),

but implement following [code 2] on of systems test pass, system bug or other reson?

// code 1  id objcminor;     if( !strcmp(minorreturntype, @encode (id)) )    {      [invominor getreturnvalue:&objcminor];    }   // code 2  void *temp = null;    [objcminor getreturnvalue:&temp];    id objcminor = (__bridge id)temp;      nsmutabledictionary *dic = [nsmutabledictionary dictionary]; [dic setobject:objcminor forkey:@"minor"]; [[nsuserdefaults standarduserdefaults] setobject:dic forkey:@"test"];    

edit xcode scheme->run->enable zombile objects
console output

*** -[cfnumber release]: message sent deallocated instance 0x7baa7460

crash screenshot :enter image description here

test demo download link https://github.com/leopardpan/issuesdemo


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -