ios - Threads RootViewController exclude memory leaks -


i have background thread, after work need update root viewcontroller results.

+ (void)mybackgroundfunction {      __weak myapprootviewcontroller * view = ...;//here app root view controller     view.needsupdatefetch = yes;              dispatch_async(dispatch_get_main_queue(), ^{          [view reloaddata];     }); } 

should use __weak exclude memory leaks? right change ivar variable(needsupdatefetch) before block? or give me pls links read about.

whether should use __weak or not depends on code written. don't need in specific case, won't hurt use it.


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

image - ClassNotFoundException when add a prebuilt apk into system.img in android -