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

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -