Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

DependencyService.Get() best practice?

$
0
0

In all of the examples that I've seen in the documentation dependencies are retrieved (DependencyService.Get()) each time the particular interface is needed. This seems like it could be more processing than is really needed, since that retrieved instance won't change. Would it buy me anything to cache the instance after the first retrieval and just reuse that instance? Or is that an unnecessary complication?


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>