ios - Some Deprecated UI Objects Causes Memory Leak On iOS8 -


i tried uialertview , uiactionsheet objects causes memory leak in ios8.4 sdk. new objects coming ios8 (such uialertcontroller) supports minimum ios8 os. how can handle leak ios8 , before releases?

example code piece causes leak;

uialertview *alert = [[uialertview alloc] initwithtitle:@""                                                  message:@""                                                  delegate:self                                                  cancelbuttontitle:@"ok"                                                  otherbuttontitles:nil]; [alert show]; 

i suggest check class availability. example, if want check whether use uialertcontroller or uialertview then:

if ([uialertcontroller class]) {    // use uialertcontroller  } else {   // use uialertview  } 

Comments

Popular posts from this blog

Qt4: how to send QString inside a struct via QSharedMemory -

python - jinja2: TemplateSyntaxError: expected token ',', got 'string' -

node.js - NodeJS remote terminal to Dropbear OpenWRT-Server -